aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-02-14 14:47:55 -0500
committerMarcoFalke <falke.marco@gmail.com>2019-02-14 14:40:49 -0500
commitfab6b07c16768543bcb6a2ce3a76bd31762a1fab (patch)
treed4735e9262b0e4d024602d1a6f72c5ddf9ba4958 /src/test
parent38989ab03fb74ad56c1018c37cb24d17cbb3a16f (diff)
test: txindex: interrupt threadGroup before calling destructor
Diffstat (limited to 'src/test')
-rw-r--r--src/test/txindex_tests.cpp8
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()