From: Michael Wallner Date: Tue, 15 Sep 2020 18:26:18 +0000 (+0200) Subject: travis: clang needs high resolution rnd seeds X-Git-Tag: 1.1.0-beta1~236^2~57 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6d977c8a834ed99f9b0c835c1eb8a89da6f11f59;p=awesomized%2Flibmemcached travis: clang needs high resolution rnd seeds --- diff --git a/testing/lib/random.cpp b/testing/lib/random.cpp index f312d8bd..9d4e8a5d 100644 --- a/testing/lib/random.cpp +++ b/testing/lib/random.cpp @@ -13,7 +13,7 @@ enable_if_t, T> random_num(T min, T max) { using rnd = mt19937; using dst = uniform_int_distribution; - auto time = duration_cast(system_clock::now().time_since_epoch()); + auto time = duration_cast(system_clock::now().time_since_epoch()); auto seed = static_cast(time.count() % numeric_limits::max()); auto rgen = rnd{seed}; return dst(min, max)(rgen); diff --git a/testing/tests/memcached/regression/lp434843.cpp b/testing/tests/memcached/regression/lp434843.cpp index 87f85399..9a372a8c 100644 --- a/testing/tests/memcached/regression/lp434843.cpp +++ b/testing/tests/memcached/regression/lp434843.cpp @@ -28,9 +28,10 @@ TEST_CASE("memcached_regression_lp434843") { array len; for (auto i = 0; i < NUM_KEYS; ++i) { - str[i] = random_ascii_string(random_num(24, 32)); + str[i] = random_ascii_string(36); chr[i] = str[i].data(); len[i] = str[i].length(); + cerr << str[i] << endl; } REQUIRE_SUCCESS(memcached_mget(memc, chr.data(), len.data(), NUM_KEYS));