From 980312b2a6e96c6d301d30d38922f8a2cc315c92 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 19 Oct 2018 23:01:52 +0200 Subject: Retry put for 30 sec to wait for peer connections --- tests/main.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/main.cpp b/tests/main.cpp index 2d1d505..d6c37e2 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -36,12 +36,10 @@ int main() gotAsdf2 = true; return true; }); - // wait until connection1 and connection2 receive each other as peers from bootstrap node - std::this_thread::sleep_for(std::chrono::seconds(3)); - + connection1.put(key, "hello", 5); - connection1.put(key, "asdf", 4); - std::this_thread::sleep_for(std::chrono::seconds(3)); + connection2.put(key, "asdf", 4); + std::this_thread::sleep_for(std::chrono::seconds(6)); REQUIRE(gotData1); REQUIRE(gotAsdf1); -- cgit v1.2.3