예제 #1
0
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")
예제 #2
0
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")
예제 #3
0
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")
예제 #4
0
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")
예제 #5
0
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
예제 #6
0
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