Skip to content
Snippets Groups Projects
Verified Commit 6cc7f6f7 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

FIX: Longer timeout if necessary.

parent c6b02f51
No related branches found
No related tags found
Loading
Pipeline #41142 failed
......@@ -53,11 +53,15 @@ TEST(test_async, retrieve_non_existing) {
auto status = transaction->GetStatus();
EXPECT_EQ(status.GetCode(), StatusCode::EXECUTING);
// wait some time
std::this_thread::sleep_for(1000ms);
// 1000ms are not always sufficient, when there is very high pipeline load.
auto count = 1000;
do {
// wait some time
std::this_thread::sleep_for(10ms);
// DONT call WaitForIt -> the transaction finishes in the back-ground
status = transaction->GetStatus();
// DONT call WaitForIt -> the transaction finishes in the background
status = transaction->GetStatus();
} while (--count > 0 && status.GetCode() == StatusCode::EXECUTING);
EXPECT_EQ(status.GetCode(), TransactionStatus::TRANSACTION_ERROR().GetCode());
ASSERT_EQ(status.GetCode(), StatusCode::GENERIC_TRANSACTION_ERROR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment