aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-10-19 23:01:52 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-18 22:56:48 +0200
commit980312b2a6e96c6d301d30d38922f8a2cc315c92 (patch)
treea9feb838af6ea34cd9d43669400e65d7ebbf6722 /tests
parenta14096f4aec0c0af285a6fcb0d368001666b8765 (diff)
Retry put for 30 sec to wait for peer connections
Diffstat (limited to 'tests')
-rw-r--r--tests/main.cpp8
1 files changed, 3 insertions, 5 deletions
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);