Skip to content

Commit

Permalink
revive: Bump connect timeout to fix flaky tests (#6567)
Browse files Browse the repository at this point in the history
The eth RPC tests fail sometimes because they run into a connect timeout
because the node takes a long time to start. This bumps the connect
timeout from 30 to 120 seconds. Locally they take around 40s for me.

As a drive by I also remove a apparently duplicated nextest config.

---------

Co-authored-by: ordian <[email protected]>
  • Loading branch information
athei and ordian authored Nov 21, 2024
1 parent a872278 commit b290f27
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 127 deletions.
1 change: 0 additions & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ retries = 5
# The number of threads to run tests with. Supported values are either an integer or
# the string "num-cpus". Can be overridden through the `--test-threads` option.
# test-threads = "num-cpus"

test-threads = 20

# The number of threads required for each test. This is generally used in overrides to
Expand Down
124 changes: 0 additions & 124 deletions substrate/.config/nextest.toml

This file was deleted.

4 changes: 2 additions & 2 deletions substrate/frame/revive/rpc/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ use static_init::dynamic;
use std::thread;
use substrate_cli_test_utils::*;

/// Create a websocket client with a 30s timeout.
/// Create a websocket client with a 120s timeout.
async fn ws_client_with_retry(url: &str) -> WsClient {
let timeout = tokio::time::Duration::from_secs(30);
let timeout = tokio::time::Duration::from_secs(120);
tokio::time::timeout(timeout, async {
loop {
if let Ok(client) = WsClientBuilder::default().build(url).await {
Expand Down

0 comments on commit b290f27

Please sign in to comment.