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

Test nodes leaving the network #1540

Merged
merged 8 commits into from
Aug 16, 2023
Merged

Test nodes leaving the network #1540

merged 8 commits into from
Aug 16, 2023

Conversation

shenkeyao
Copy link
Member

Adds tests for 1, f/2, and f nodes leaving the network.

Closes #1466.

elliedavidson
elliedavidson previously approved these changes Aug 11, 2023
Copy link
Member

@elliedavidson elliedavidson left a comment

Choose a reason for hiding this comment

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

A few minor comments, otherwise looks good!

justfile Outdated
@@ -30,8 +30,8 @@ _test_basic_tokio:
echo Testing with async std executor
RUST_LOG="" cargo test --features=tokio-ci --lib --bins --tests --benches --workspace --no-fail-fast test_basic -- --test-threads=1 --nocapture

test_with_failures:
echo Testing with async std executor
_test_with_failures:
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Why do we need an underscore here? Wouldn't that imply we don't use this test? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Was trying to use the same format as _test_basic, but yeah I think we could remove the underscore! I'll remove it from _test_basic as well.

tokio::test(flavor = "multi_thread", worker_threads = 2)
)]
#[cfg_attr(feature = "async-std-executor", async_std::test)]
async fn test_with_failures_f() {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Maybe we could add a quick comment that these failures purposefully don't include DA nodes. I feel like we may forget this in the future when we switch to a rotating DA committee, and then we'll wonder why these tests fail. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, the failures actually include the DA nodes. The DA committee is the entire network for this test, so those 6 nodes to be killed are also DA nodes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now failures only include DA nodes, so I added a comment.

Copy link
Contributor

@DieracDelta DieracDelta left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@elliedavidson elliedavidson left a comment

Choose a reason for hiding this comment

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

LGTM!

@shenkeyao shenkeyao merged commit 258ef6e into main Aug 16, 2023
6 of 7 checks passed
@shenkeyao shenkeyao deleted the keyao/test_kill_nodes branch August 16, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests for Nodes Leaving the Nework
3 participants