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

MAINT: Changelog and simplified code a bit.

parent 6cc7f6f7
Branches
No related tags found
1 merge request!29fix async timeout
Pipeline #41146 failed
...@@ -19,4 +19,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -19,4 +19,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
* Fixed failing async test.
### Security ### Security
...@@ -55,15 +55,17 @@ TEST(test_async, retrieve_non_existing) { ...@@ -55,15 +55,17 @@ TEST(test_async, retrieve_non_existing) {
// 1000ms are not always sufficient, when there is very high pipeline load. // 1000ms are not always sufficient, when there is very high pipeline load.
auto count = 1000; auto count = 1000;
auto code = transaction->GetStatus().GetCode();
do { do {
// wait some time // wait some time
std::this_thread::sleep_for(10ms); std::this_thread::sleep_for(10ms);
// DONT call WaitForIt -> the transaction finishes in the background // DONT call WaitForIt -> the transaction finishes in the background
status = transaction->GetStatus(); code = transaction->GetStatus().GetCode();
} while (--count > 0 && status.GetCode() == StatusCode::EXECUTING); } while (--count > 0 && code == StatusCode::EXECUTING);
EXPECT_EQ(status.GetCode(), TransactionStatus::TRANSACTION_ERROR().GetCode()); ASSERT_GT(count, 0) << "ERROR: Timeout while waiting for transaction.";
ASSERT_EQ(status.GetCode(), StatusCode::GENERIC_TRANSACTION_ERROR); EXPECT_EQ(code, TransactionStatus::TRANSACTION_ERROR().GetCode());
ASSERT_EQ(code, StatusCode::GENERIC_TRANSACTION_ERROR);
const auto &result_set = transaction->GetResultSet(); const auto &result_set = transaction->GetResultSet();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment