aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2018-08-26 10:29:29 -0400
committerMarcoFalke <[email protected]>2018-08-26 10:29:30 -0400
commit11172835435f9ba00cfb940cc6fa2d6c538a9931 (patch)
tree960e4bedd70978d8736bcdc5e8fc8d829c31dfab /src
parentMerge #14063: Move cs_main locking annotations from .cpp to .h (diff)
parentUse assert when running from multithreaded code as BOOST_CHECK_* are not thre... (diff)
downloaddiscoin-11172835435f9ba00cfb940cc6fa2d6c538a9931.tar.xz
discoin-11172835435f9ba00cfb940cc6fa2d6c538a9931.zip
Merge #14069: qa: Use assert not BOOST_CHECK_* from multithreaded tests
737670c036 Use assert when running from multithreaded code as BOOST_CHECK_* are not thread safe (Jesse Cohen) Pull request description: Resolves thread sanitizer failure @MarcoFalke found in #14058 Tree-SHA512: 24d86c2cdae21fee029ee4b06f633de4b3e655d3371d97f09db6fd3f24b29388a78110996712249c49e7fefa7bbc3d3c405d8b480382174831fe2f9a042a557e
Diffstat (limited to 'src')
-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 001d8eb64..2af0ab22d 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++);
});
}