You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by is...@apache.org on 2021/03/26 21:21:38 UTC
[ignite-python-thin-client] branch master updated: IGNITE-13862 Add
test case for put_all large amount of complex maps
This is an automated email from the ASF dual-hosted git repository.
isapego pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-python-thin-client.git
The following commit(s) were added to refs/heads/master by this push:
new 0bcd77f IGNITE-13862 Add test case for put_all large amount of complex maps
0bcd77f is described below
commit 0bcd77f170f497a4430cf92844108e8390ee68f2
Author: Ivan Dashchinskiy <iv...@gmail.com>
AuthorDate: Sat Mar 27 00:21:02 2021 +0300
IGNITE-13862 Add test case for put_all large amount of complex maps
This closes #22
---
tests/common/test_key_value.py | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/common/test_key_value.py b/tests/common/test_key_value.py
index 0f492a2..6e6df61 100644
--- a/tests/common/test_key_value.py
+++ b/tests/common/test_key_value.py
@@ -417,3 +417,27 @@ def test_put_get_collection(cache, key, hinted_value, value):
async def test_put_get_collection_async(async_cache, key, hinted_value, value):
await async_cache.put(key, hinted_value)
assert await async_cache.get(key) == value
+
+
+@pytest.fixture
+def complex_map():
+ return {"test" + str(i): ((MapObject.HASH_MAP,
+ {"key_1": ((1, ["value_1", 1.0]), CollectionObject),
+ "key_2": ((1, [["value_2_1", "1.0"], ["value_2_2", "0.25"]]), CollectionObject),
+ "key_3": ((1, [["value_3_1", "1.0"], ["value_3_2", "0.25"]]), CollectionObject),
+ "key_4": ((1, [["value_4_1", "1.0"], ["value_4_2", "0.25"]]), CollectionObject),
+ 'key_5': False,
+ "key_6": "value_6"}), MapObject) for i in range(10000)}
+
+
+def test_put_all_large_complex_map(cache, complex_map):
+ cache.put_all(complex_map)
+ values = cache.get_all(complex_map.keys())
+ assert len(values) == len(complex_map)
+
+
+@pytest.mark.asyncio
+async def test_put_all_large_complex_map_async(async_cache, complex_map):
+ await async_cache.put_all(complex_map)
+ values = await async_cache.get_all(complex_map.keys())
+ assert len(values) == len(complex_map)