aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/addition_overflow.cpp
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2022-12-07 17:04:15 -0500
committerAndrew Chow <github@achow101.com>2022-12-09 13:57:01 -0500
commit8c20796aacbbf5261e1922d45fc8afe75f54fefb (patch)
tree89a832737af00c16b2231532c84c8ff62ba051f3 /src/test/fuzz/addition_overflow.cpp
parent6c872d5e656a7117bbdf19a0220572b93de16f31 (diff)
tests: Use waitfornewblock for work queue test in interface_rpc
The work queue exceeded test in interface_rpc.py would repeatedly call an RPC until the error was achieved. However hitting this error is dependent on the processing speed of the computer and the optimization level of the binary. Configurations that result in slower processing would result in the RPC used being processed before the error could be hit, resulting the test's runtime having a high variance. Switching the RPC to waitfornewblock allows it to run in a much more consistent time that is still fairly fast. waitfornewblock forces the RPC server to allocate a thread and wait, occupying a spot in the work queue. This is perfect for this test because the slower the RPC, the more likely we will achieve the race condition necessary to pass the test. Using a timeout of 500 ms appears to work reliably without causing the test to take too long.
Diffstat (limited to 'src/test/fuzz/addition_overflow.cpp')
0 files changed, 0 insertions, 0 deletions