From: Michael Wallner Date: Fri, 2 Oct 2020 15:56:15 +0000 (+0200) Subject: ensure unique keys X-Git-Tag: 1.1.0-beta1~236^2~22^2~17 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6ee56acd6aaf36daef44294d90cd2e9481cdc11e;p=awesomized%2Flibmemcached ensure unique keys --- diff --git a/test/tests/memcached/regression/binary_block_add.cpp b/test/tests/memcached/regression/binary_block_add.cpp index c0873aa8..468a611d 100644 --- a/test/tests/memcached/regression/binary_block_add.cpp +++ b/test/tests/memcached/regression/binary_block_add.cpp @@ -11,7 +11,7 @@ TEST_CASE("memcached_regression_binary_block_add") { INFO("binary: " << binary); for (auto i = 0; i < 20480; ++i) { - auto rkey = random_ascii_string(12); + auto rkey = random_ascii_string(12) + to_string(i); memcached_return_t rc = memcached_add_by_key(memc, S("key"), rkey.c_str(), rkey.length(), blob.c_str(), blob.length(), 0, 0); if (rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE) { diff --git a/test/tests/memcached/stat.cpp b/test/tests/memcached/stat.cpp index 92682f57..c07a0d1e 100644 --- a/test/tests/memcached/stat.cpp +++ b/test/tests/memcached/stat.cpp @@ -22,7 +22,7 @@ TEST_CASE("memcached_stat") { SECTION("execute") { for (auto i = 0; i < 64; ++i) { - auto key = random_ascii_string(32); + auto key = random_ascii_string(12) + to_string(i); REQUIRE_SUCCESS(memcached_set(memc, key.c_str(), key.length(), nullptr, 0, 0, 0)); }