1
0
Fork 0

Replaced usleep by this_thread::sleep_for as usleep can return to early letting the test fail (#3800)

This commit is contained in:
Michael Hackstein 2017-11-24 13:54:28 +01:00 committed by Jan
parent dbab414321
commit 1bac6dd414
1 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@
#include <velocypack/Slice.h>
#include <velocypack/velocypack-aliases.h>
#include <thread>
#include <queue>
using namespace arangodb;
@ -1186,7 +1187,7 @@ SCENARIO("The shard distribution can be reported", "[cluster][shards]") {
ClusterCommTimeout timeout) {
if (operationID != 0) {
// Let us sleep 2 seconds here
usleep(2000000);
std::this_thread::sleep_for(std::chrono::seconds(2));
return leaderRes;
}
if (returnedFirstFollower) {