From 081bd37315a57616144a8e6272a2ea796ace989e Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Tue, 8 Oct 2019 18:59:27 +0300 Subject: [PATCH] Fix flapping of test_service_intro_point() unittest. --- changes/bug31995 | 3 +++ src/test/test_hs_service.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changes/bug31995 diff --git a/changes/bug31995 b/changes/bug31995 new file mode 100644 index 0000000000..c7ddd437a6 --- /dev/null +++ b/changes/bug31995 @@ -0,0 +1,3 @@ + o Minor bugfixes (testing): + - Avoid intermittent test failures due to a test that had relied on + inconsistent timing sources. Fixes bug 31995; bugfix on 0.3.1.3-alpha. diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c index c5854f0ff8..8993ce3fe2 100644 --- a/src/test/test_hs_service.c +++ b/src/test/test_hs_service.c @@ -674,9 +674,11 @@ test_service_intro_point(void *arg) (void) arg; + update_approx_time(1481621834); + /* Test simple creation of an object. */ { - time_t now = time(NULL); + time_t now = approx_time(); ip = helper_create_service_ip(); tt_assert(ip); /* Make sure the authentication keypair is not zeroes. */