Skip to content

Commit

Permalink
Refactoring zstdnodict to zstd_no_dict (opensearch-project#340)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
  • Loading branch information
sarthakaggarwal97 authored Jun 29, 2023
1 parent d1eba71 commit cfeceb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion osbenchmark/workload/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ class IndexCodec(Enum):
Default = "default"
BestCompression = "best_compression"
ZSTD = "zstd"
ZSTDNODICT = "zstdnodict"
ZSTDNODICT = "zstd_no_dict"

@classmethod
def is_codec_valid(cls, codec):
Expand Down
6 changes: 3 additions & 3 deletions tests/workload/params_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ def test_create_index_with_zstdnodict_codec(self):
"body": {
"settings": {
"index.number_of_replicas": 0,
"index.codec": "zstdnodict"
"index.codec": "zstd_no_dict"
},
"mappings": {
"doc": {
Expand All @@ -1686,7 +1686,7 @@ def test_create_index_with_zstdnodict_codec(self):
self.assertEqual("test", index)
self.assertTrue(len(body) > 0)
self.assertEqual({}, p["request-params"])
self.assertEqual("zstdnodict", body["settings"]["index.codec"])
self.assertEqual("zstd_no_dict", body["settings"]["index.codec"])

def test_create_index_with_invalid_codec(self):
with self.assertRaises(exceptions.InvalidSyntax) as context:
Expand All @@ -1711,7 +1711,7 @@ def test_create_index_with_invalid_codec(self):

self.assertEqual(str(context.exception),
"Please set the value properly for the create-index operation. Invalid index.codec value " +
"'invalid_codec'. Choose from available codecs: ['default', 'best_compression', 'zstd', 'zstdnodict']")
"'invalid_codec'. Choose from available codecs: ['default', 'best_compression', 'zstd', 'zstd_no_dict']")

class CreateDataStreamParamSourceTests(TestCase):
def test_create_data_stream(self):
Expand Down

0 comments on commit cfeceb7

Please sign in to comment.