Unique core name - test update
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
@@ -128,7 +128,7 @@ def test_add_remove_30core(pyocf_ctx):
|
||||
stats = cache.get_stats()
|
||||
assert stats["conf"]["core_count"] == i
|
||||
core_device = Volume(S.from_MiB(10))
|
||||
core = Core.using_device(core_device)
|
||||
core = Core.using_device(core_device, name=f"core{i}")
|
||||
core_devices.append(core)
|
||||
cache.add_core(core)
|
||||
|
||||
@@ -158,7 +158,7 @@ def test_adding_to_random_cache(pyocf_ctx):
|
||||
# Create 50 core devices and add to random cache
|
||||
for i in range(0, core_amount):
|
||||
core_device = Volume(S.from_MiB(10))
|
||||
core = Core.using_device(core_device)
|
||||
core = Core.using_device(core_device, name=f"core{i}")
|
||||
core_devices[core] = randint(0, cache_amount - 1)
|
||||
cache_devices[core_devices[core]].add_core(core)
|
||||
|
||||
@@ -246,7 +246,7 @@ def test_add_remove_incrementally(pyocf_ctx, cache_mode, cls):
|
||||
# Create 5 core devices and add to cache
|
||||
for i in range(0, core_amount):
|
||||
core_device = Volume(S.from_MiB(10))
|
||||
core = Core.using_device(core_device)
|
||||
core = Core.using_device(core_device, name=f"core{i}")
|
||||
core_devices.append(core)
|
||||
cache.add_core(core)
|
||||
|
||||
|
@@ -64,9 +64,9 @@ def test_cache_change_seq_cut_off_policy(pyocf_ctx, cm, cls):
|
||||
|
||||
# Create 2 core devices
|
||||
core_device1 = Volume(S.from_MiB(10))
|
||||
core1 = Core.using_device(core_device1)
|
||||
core1 = Core.using_device(core_device1, name="core1")
|
||||
core_device2 = Volume(S.from_MiB(10))
|
||||
core2 = Core.using_device(core_device2)
|
||||
core2 = Core.using_device(core_device2, name="core2")
|
||||
|
||||
# Add cores
|
||||
cache.add_core(core1)
|
||||
@@ -103,9 +103,9 @@ def test_core_change_seq_cut_off_policy(pyocf_ctx, cm, cls):
|
||||
|
||||
# Create 2 core devices
|
||||
core_device1 = Volume(S.from_MiB(10))
|
||||
core1 = Core.using_device(core_device1)
|
||||
core1 = Core.using_device(core_device1, name="core1")
|
||||
core_device2 = Volume(S.from_MiB(10))
|
||||
core2 = Core.using_device(core_device2)
|
||||
core2 = Core.using_device(core_device2, name="core2")
|
||||
|
||||
# Add cores
|
||||
cache.add_core(core1)
|
||||
|
Reference in New Issue
Block a user