Skip to content

Commit ac40ed7

Browse files
error10MarcoFalke
authored andcommitted
Increase timeout waiting for pruned blk00000.dat
In my ever-growing list of test failures, I was seeing this one intermittently. ``` Running 2nd level testscript pruning.py... Initializing test directory /tmp/testY5ypCv Warning! This test requires 4GB of disk space and takes over 30 mins (up to 2 hours) Mining a big blockchain of 995 blocks Check that we haven't started pruning yet because we're below PruneAfterHeight Success Though we're already using more than 550MB, current usage: 587 Mining 25 more blocks should cause the first block file to be pruned Assertion failed: blk00000.dat not pruned when it should be File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/test_framework/test_framework.py", line 118, in main self.run_test() File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/pruning.py", line 272, in run_test self.test_height_min() File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/pruning.py", line 94, in test_height_min raise AssertionError("blk00000.dat not pruned when it should be") Stopping nodes Failed ``` After digging into the test, I found that the code is waiting 10 seconds for blk00000.dat to be deleted, and then throwing this failure if it still exists after 10 seconds. I increased this amount, had the script print the actual time taken, and ran the test a few more times. The time taken ranged between 8 to 12 seconds. So, I feel that this timeout is too short. After changing the timeout to 30 seconds, the test passes consistently. (cherry picked from commit 3469911c89a48dd2fefe4d1c2a0c176256e14ee0)
1 parent b33824b commit ac40ed7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qa/rpc-tests/pruning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_height_min(self):
7575
waitstart = time.time()
7676
while os.path.isfile(self.prunedir+"blk00000.dat"):
7777
time.sleep(0.1)
78-
if time.time() - waitstart > 10:
78+
if time.time() - waitstart > 30:
7979
raise AssertionError("blk00000.dat not pruned when it should be")
8080

8181
print("Success")

0 commit comments

Comments
 (0)