Exemple #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")
Exemple #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")
Exemple #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")
Exemple #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")
Exemple #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
Exemple #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