Skip to content

Commit f5be43c

Browse files
committed
Reduce the shared memory size in the test case to avoid the error
Signed-off-by: Gigon Bae <[email protected]>
1 parent 03127d2 commit f5be43c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python/cucim/tests/unit/clara/test_image_cache.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,24 @@ def test_get_per_process_cache():
6868
def test_get_shared_memory_cache():
6969
from cucim import CuImage
7070

71-
cache = CuImage.cache("shared_memory", memory_capacity=2048)
71+
cache = CuImage.cache("shared_memory", memory_capacity=128)
7272
assert int(cache.type) == 2
7373
assert cache.memory_size == 0
7474
# It allocates additional memory
75-
assert cache.memory_capacity > 2**20 * 2048
76-
assert cache.free_memory > 2**20 * 2048
75+
assert cache.memory_capacity > 2**20 * 128
76+
assert cache.free_memory > 2**20 * 128
7777
assert cache.size == 0
7878
assert cache.capacity > 0
7979
assert cache.hit_count == 0
8080
assert cache.miss_count == 0
8181

8282
config = cache.config
8383
# Check essential properties
84-
# {'type': 'shared_memory', 'memory_capacity': 2048, 'capacity': 10922,
85-
# 'mutex_pool_capacity': 11117, 'list_padding': 10000,
84+
# {'type': 'shared_memory', 'memory_capacity': 2048, 'capacity': 682,
85+
# 'mutex_pool_capacity': 100003, 'list_padding': 10000,
8686
# 'extra_shared_memory_size': 100, 'record_stat': False}
8787
assert config["type"] == "shared_memory"
88-
assert config["memory_capacity"] == 2048
88+
assert config["memory_capacity"] == 128
8989
assert not config["record_stat"]
9090

9191

0 commit comments

Comments
 (0)