diff options
| author | practicalswift <[email protected]> | 2018-12-15 09:59:24 +0100 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-12-15 16:14:36 +0100 |
| commit | d98a29ec408590e54f405a7f8d232cd9dc5b14da (patch) | |
| tree | 296ebb3a7a3c3af2fd27c7527df4cc1a6b3e8edd /src/test/cuckoocache_tests.cpp | |
| parent | Merge #14935: tests: Test for expected return values when calling functions r... (diff) | |
| download | discoin-d98a29ec408590e54f405a7f8d232cd9dc5b14da.tar.xz discoin-d98a29ec408590e54f405a7f8d232cd9dc5b14da.zip | |
Fix cuckoocache_tests TSAN failure introduced in #14935. Fixes #14967.
Diffstat (limited to 'src/test/cuckoocache_tests.cpp')
| -rw-r--r-- | src/test/cuckoocache_tests.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp index a99e17693..d8286520e 100644 --- a/src/test/cuckoocache_tests.cpp +++ b/src/test/cuckoocache_tests.cpp @@ -220,8 +220,10 @@ static void test_cache_erase_parallel(size_t megabytes) size_t ntodo = (n_insert/4)/3; size_t start = ntodo*x; size_t end = ntodo*(x+1); - for (uint32_t i = start; i < end; ++i) - BOOST_CHECK(set.contains(hashes[i], true)); + for (uint32_t i = start; i < end; ++i) { + bool contains = set.contains(hashes[i], true); + assert(contains); + } }); /** Wait for all threads to finish |