Skip to content

Commit

Permalink
GH-1435 Make sure app_thread of test is always joined to avoid terminate
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jul 21, 2023
1 parent 78c1b62 commit 3b2227e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_read_only_trx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ void test_trxs_common(std::vector<const char*>& specific_args, bool test_disable
plugin_promise.set_value( {app->find_plugin<producer_plugin>(), app->find_plugin<chain_plugin>()} );
app->exec();
} );
fc::scoped_exit<std::function<void()>> on_except = [&](){
if (app_thread.joinable())
app_thread.join();
};

auto[prod_plug, chain_plug] = plugin_fut.get();

Expand Down

0 comments on commit 3b2227e

Please sign in to comment.