def check_migration_data(host, port): with workload_common.make_memcache_connection({"address": (host, port), "mclib": "pylibmc", "protocol": "text"}) as mc: while (mc.set("test", "test") == 0): time.sleep(5) for i in range(num_keys): if mc.get(str(i)) != str(i): raise TestError("Incorrect value")
def throw_migration_data(host, port): with workload_common.make_memcache_connection({"address": (host, port), "mclib": "pylibmc", "protocol": "text"}) as mc: while (mc.set("test", "test") == 0): time.sleep(5) for i in range(num_keys): if mc.set(str(i), str(i)) == 0: raise TestError("Write failed")
def check_migration_data(host, port): with workload_common.make_memcache_connection( {"address": (host, port), "mclib": "pylibmc", "protocol": "text"} ) as mc: while mc.set("test", "test") == 0: time.sleep(5) for i in range(num_keys): if mc.get(str(i)) != str(i): raise TestError("Incorrect value")
def throw_migration_data(host, port): with workload_common.make_memcache_connection( {"address": (host, port), "mclib": "pylibmc", "protocol": "text"} ) as mc: while mc.set("test", "test") == 0: time.sleep(5) for i in range(num_keys): if mc.set(str(i), str(i)) == 0: raise TestError("Write failed")
def test_against(host, port): with workload_common.make_memcache_connection({"address": (host, port), "mclib": "pylibmc", "protocol": "text"}) as mc: while (mc.set("test", "test") == 0): time.sleep(5) for i in range(num_keys): if mc.set(str(i), str(i)) == 0: return False for i in range(num_keys): if mc.get(str(i)) != str(i): return False return True
def test_against(host, port): with workload_common.make_memcache_connection( {"address": (host, port), "mclib": "pylibmc", "protocol": "text"} ) as mc: while mc.set("test", "test") == 0: time.sleep(5) for i in range(num_keys): if mc.set(str(i), str(i)) == 0: return False for i in range(num_keys): if mc.get(str(i)) != str(i): return False return True