diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-02-16 12:58:22 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-02-16 12:58:26 -0500 |
commit | f9d50e83e290efd1147aad576b82bd9599fc6467 (patch) | |
tree | c363c8c2c25531c6ff327f512ed64651f2df86e1 /src | |
parent | 743c2f461c0e7c58b1e5c6ddfeaf4f0ff6e6ca85 (diff) | |
parent | fab6b07c16768543bcb6a2ce3a76bd31762a1fab (diff) |
Merge #15410: test: txindex: interrupt threadGroup before calling destructor
fab6b07c16 test: txindex: interrupt threadGroup before calling destructor (MarcoFalke)
Pull request description:
Fixes the data races with the tread sanitizer such as
* https://travis-ci.org/MarcoFalke/bitcoin/jobs/492330554
* https://github.com/bitcoin/bitcoin/pull/15402#discussion_r256676622
* ...
Tree-SHA512: 40608c70d92a1dd68efc1d41eecc8e2fb7738508e21f91f0ad353adcceed60fa624f15bf72a5b69a9444157b261183abbe9fc4cc5dd8aebc1c49506b239e8e88
Diffstat (limited to 'src')
-rw-r--r-- | src/test/txindex_tests.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/txindex_tests.cpp b/src/test/txindex_tests.cpp index 0301901bf0..d667c26c3c 100644 --- a/src/test/txindex_tests.cpp +++ b/src/test/txindex_tests.cpp @@ -69,7 +69,13 @@ BOOST_FIXTURE_TEST_CASE(txindex_initial_sync, TestChain100Setup) } } - txindex.Stop(); // Stop thread before calling destructor + // shutdown sequence (c.f. Shutdown() in init.cpp) + txindex.Stop(); + + threadGroup.interrupt_all(); + threadGroup.join_all(); + + // Rest of shutdown sequence and destructors happen in ~TestingSetup() } BOOST_AUTO_TEST_SUITE_END() |