Skip to content

Commit

Permalink
Fix random catchpoint catchup expect test case (algorand#1208)
Browse files Browse the repository at this point in the history
The test was creating a proxy which delays requests execution as a way to slow down the catchpoint catchup process.
This is important so that we can monitor from the goal command that the catchup is working as intended.
However, delaying the command execution caused an issue where the node was trying to issue multiple requests for blocks 1-16, in parallel, which reached the proxy at an arbitrary order. As a result, the request for block #1 was delayed by more than 4 second, causing it it timeout.

The solution was to reconfigure the number of parallel blocks being retrieved to 2. This would ensure that we only getting two blocks at a time. Since the delay is configured to 1.5 seconds, this would also be the delay, which is well under 4 second.
  • Loading branch information
tsachiherman authored Jun 27, 2020
1 parent d787f3d commit d8c08a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/e2e-go/cli/goal/expect/catchpointCatchupTest.exp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ if { [catch {
exec rm $TEST_ROOT_DIR/Primary/config.json
exec mv $TEST_ROOT_DIR/Primary/config.json.new $TEST_ROOT_DIR/Primary/config.json

# Update the Second Node configuration
exec -- cat "$TEST_ROOT_DIR/Node/config.json" | jq {. |= . + {"CatchupParallelBlocks":2}} > $TEST_ROOT_DIR/Node/config.json.new
exec rm $TEST_ROOT_DIR/Node/config.json
exec mv $TEST_ROOT_DIR/Node/config.json.new $TEST_ROOT_DIR/Node/config.json


set ::GLOBAL_TEST_ALGO_DIR $TEST_ALGO_DIR
set ::GLOBAL_TEST_ROOT_DIR $TEST_ROOT_DIR
set ::GLOBAL_NETWORK_NAME $NETWORK_NAME
Expand Down

0 comments on commit d8c08a7

Please sign in to comment.