Skip to content

Commit ec24b29

Browse files
isapegoivandasch
andauthored
GG-32947 [IGNITE-13862] Add test case for put_all large amount of complex maps (#32)
(cherry picked from commit 0bcd77f) Co-authored-by: Ivan Dashchinskiy <ivandasch@gmail.com>
1 parent 1cc0a56 commit ec24b29

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

tests/common/test_key_value.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,27 @@ def test_put_get_collection(cache, key, hinted_value, value):
417417
async def test_put_get_collection_async(async_cache, key, hinted_value, value):
418418
await async_cache.put(key, hinted_value)
419419
assert await async_cache.get(key) == value
420+
421+
422+
@pytest.fixture
423+
def complex_map():
424+
return {"test" + str(i): ((MapObject.HASH_MAP,
425+
{"key_1": ((1, ["value_1", 1.0]), CollectionObject),
426+
"key_2": ((1, [["value_2_1", "1.0"], ["value_2_2", "0.25"]]), CollectionObject),
427+
"key_3": ((1, [["value_3_1", "1.0"], ["value_3_2", "0.25"]]), CollectionObject),
428+
"key_4": ((1, [["value_4_1", "1.0"], ["value_4_2", "0.25"]]), CollectionObject),
429+
'key_5': False,
430+
"key_6": "value_6"}), MapObject) for i in range(10000)}
431+
432+
433+
def test_put_all_large_complex_map(cache, complex_map):
434+
cache.put_all(complex_map)
435+
values = cache.get_all(complex_map.keys())
436+
assert len(values) == len(complex_map)
437+
438+
439+
@pytest.mark.asyncio
440+
async def test_put_all_large_complex_map_async(async_cache, complex_map):
441+
await async_cache.put_all(complex_map)
442+
values = await async_cache.get_all(complex_map.keys())
443+
assert len(values) == len(complex_map)

0 commit comments

Comments
 (0)