Skip to content

Commit

Permalink
Merge pull request #1818 from AntelopeIO/GH-1815-test-stuck-5.0
Browse files Browse the repository at this point in the history
[5.0] Test Fix: Avoid deadlock on app_thread
  • Loading branch information
heifner authored Oct 24, 2023
2 parents 0501a7e + 894648d commit 42e7679
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_read_only_trx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ void test_trxs_common(std::vector<const char*>& specific_args, bool test_disable
BOOST_CHECK(!"app threw exception see logged error");
} );
fc::scoped_exit<std::function<void()>> on_except = [&](){
app->quit();
if (app_thread.joinable())
app_thread.join();
};
Expand Down Expand Up @@ -166,8 +167,6 @@ void test_trxs_common(std::vector<const char*>& specific_args, bool test_disable
while ( (next_calls < num_pushes || num_get_account_calls < num_pushes) && fc::time_point::now() < hard_deadline ){
std::this_thread::sleep_for( 100ms );
}

app->quit();
}

BOOST_CHECK_EQUAL( trace_with_except, 0u ); // should not have any traces with except in it
Expand Down

0 comments on commit 42e7679

Please sign in to comment.