aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Cohen <jc@jc.lol>2018-08-26 09:41:57 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-08-27 13:44:41 -0400
commitcf3d7f94c2efd15a9cb910ccee31505934d55641 (patch)
tree142a976f1ff1e11805aa70a3857ffa53c20cbdad
parentfab0fbefcf51f38aa858423017b545df6d098311 (diff)
downloadbitcoin-cf3d7f94c2efd15a9cb910ccee31505934d55641.tar.xz
Use assert when running from multithreaded code as BOOST_CHECK_* are not thread safe
Github-Pull: #14069 Rebased-From: 737670c036e802e0fd8b51efffb41131d08f0204
-rw-r--r--src/test/scheduler_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp
index 001d8eb64b..2af0ab22da 100644
--- a/src/test/scheduler_tests.cpp
+++ b/src/test/scheduler_tests.cpp
@@ -138,11 +138,11 @@ BOOST_AUTO_TEST_CASE(singlethreadedscheduler_ordered)
// the callbacks should run in exactly the order in which they were enqueued
for (int i = 0; i < 100; ++i) {
queue1.AddToProcessQueue([i, &counter1]() {
- BOOST_CHECK_EQUAL(i, counter1++);
+ assert(i == counter1++);
});
queue2.AddToProcessQueue([i, &counter2]() {
- BOOST_CHECK_EQUAL(i, counter2++);
+ assert(i == counter2++);
});
}