From 6d977c8a834ed99f9b0c835c1eb8a89da6f11f59 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 15 Sep 2020 20:26:18 +0200 Subject: [PATCH] travis: clang needs high resolution rnd seeds --- testing/lib/random.cpp | 2 +- testing/tests/memcached/regression/lp434843.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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)); -- 2.30.2