Skip to content

Commit 32f2169

Browse files
authored
Adjust tests to avoid Travis timeouts (dashpay#1745)
- add some stdout spam to heavy tests (versionbits_tests, coins_tests and PrevectorTests) - replace `--show_progress` with `--log_level=test_suite` to print these messages and avoid timeout
1 parent bc83425 commit 32f2169

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ script:
8282
- make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
8383
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
8484
- if [ "$RUN_TESTS" = "true" -a "$WINE" != "true" ]; then travis_wait 30 make $MAKEJOBS check VERBOSE=1; fi
85-
- if [ "$RUN_TESTS" = "true" -a "$WINE" = "true" ]; then wine src/test/test_dash.exe --show_progress; fi
85+
- if [ "$RUN_TESTS" = "true" -a "$WINE" = "true" ]; then wine src/test/test_dash.exe --log_level=test_suite; fi
8686
- if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.py --coverage; fi
8787
after_script:
8888
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi

src/test/coins_tests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
190190

191191
// Once every 1000 iterations and at the end, verify the full cache.
192192
if (insecure_rand() % 1000 == 1 || i == NUM_SIMULATION_ITERATIONS - 1) {
193+
BOOST_TEST_MESSAGE("coins_cache_simulation_test - verifying full cache");
193194
for (auto it = result.begin(); it != result.end(); it++) {
194195
bool have = stack.back()->HaveCoin(it->first);
195196
const Coin& coin = stack.back()->AccessCoin(it->first);
@@ -422,6 +423,7 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
422423

423424
// Once every 1000 iterations and at the end, verify the full cache.
424425
if (insecure_rand() % 1000 == 1 || i == NUM_SIMULATION_ITERATIONS - 1) {
426+
BOOST_TEST_MESSAGE("updatecoins_simulation_test - verifying full cache");
425427
for (auto it = result.begin(); it != result.end(); it++) {
426428
bool have = stack.back()->HaveCoin(it->first);
427429
const Coin& coin = stack.back()->AccessCoin(it->first);

src/test/prevector_tests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ class prevector_tester {
186186
BOOST_AUTO_TEST_CASE(PrevectorTestInt)
187187
{
188188
for (int j = 0; j < 64; j++) {
189+
BOOST_TEST_MESSAGE("PrevectorTestInt " << j);
189190
prevector_tester<8, int> test;
190191
for (int i = 0; i < 2048; i++) {
191192
int r = insecure_rand();

src/test/versionbits_tests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ BOOST_FIXTURE_TEST_SUITE(versionbits_tests, TestingSetup)
136136
BOOST_AUTO_TEST_CASE(versionbits_test)
137137
{
138138
for (int i = 0; i < 64; i++) {
139+
BOOST_TEST_MESSAGE("versionbits_test " << i);
140+
139141
// DEFINED -> FAILED
140142
VersionBitsTester().TestDefined()
141143
.Mine(1, TestTime(1), 0x100).TestDefined()

0 commit comments

Comments
 (0)