Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revive: Bump connect timeout to fix flaky tests #6567

Merged
merged 4 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the node takes more than 30s to serve the rpc endpoint? I thought the issue was with the overall test taking more than 30s

Copy link
Member Author

@athei athei Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. It was failing here. Nextest allots 2x60s before it kills you. Kitchensink in debug mode has a long startup time and this is where the time is spent AFAIK.

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
Loading