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

Run some network test cases in parallel to speed them up #2960

Merged
merged 2 commits into from
Oct 28, 2021

Conversation

teor2345
Copy link
Contributor

Motivation

Some of our network tests are quite slow, and we're running into test timeouts on Windows.

This is unexpected work in sprint 21.

Solution

Run some network tests in parallel to speed them up.

Review

@oxarbitrage can review this PR. It's a low priority.

ZIP-401 and the security tickets should merge before this PR.

Reviewer Checklist

  • Existing tests pass

@teor2345 teor2345 added C-bug Category: This is a bug P-Low I-integration-fail Continuous integration fails, including build and test failures A-network Area: Network protocol updates or fixes labels Oct 27, 2021
@teor2345 teor2345 added this to the 2021 Sprint 21 milestone Oct 27, 2021
@teor2345 teor2345 requested a review from oxarbitrage October 27, 2021 01:22
@teor2345 teor2345 self-assigned this Oct 27, 2021
@teor2345 teor2345 force-pushed the network-test-speedup branch from c8c2045 to bdd5d78 Compare October 27, 2021 01:26
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

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

I think this looks good, there is am overall 10 seconds improve with the addition of some more coverage.

Running affected tests in the current main:

$ cargo test peer_set::initialize::tests::vectors::local_listener
...
     Running unittests (target/debug/deps/zebra_network-04d5f9f7ec7d481e)

running 3 tests
test peer_set::initialize::tests::vectors::local_listener_fixed_port_localhost_addr ... ok
test peer_set::initialize::tests::vectors::local_listener_unspecified_port_localhost_addr ... ok
test peer_set::initialize::tests::vectors::local_listener_unspecified_port_unspecified_addr ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 53 filtered out; finished in 30.09s

Running affected tests with this PR:

$ cargo test peer_set::initialize::tests::vectors::local_listener
...
     Running unittests (target/debug/deps/zebra_network-04d5f9f7ec7d481e)

running 6 tests
test peer_set::initialize::tests::vectors::local_listener_unspecified_port_localhost_addr_v6 ... ok
test peer_set::initialize::tests::vectors::local_listener_fixed_port_localhost_addr_v4 ... ok
test peer_set::initialize::tests::vectors::local_listener_fixed_port_localhost_addr_v6 ... ok
test peer_set::initialize::tests::vectors::local_listener_unspecified_port_localhost_addr_v4 ... ok
test peer_set::initialize::tests::vectors::local_listener_unspecified_port_unspecified_addr_v4 ... ok
test peer_set::initialize::tests::vectors::local_listener_unspecified_port_unspecified_addr_v6 ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 53 filtered out; finished in 20.03s

@teor2345 teor2345 changed the base branch from main to limit-inbound-peers October 28, 2021 00:57
@teor2345 teor2345 merged commit 5200b34 into limit-inbound-peers Oct 28, 2021
@teor2345 teor2345 deleted the network-test-speedup branch October 28, 2021 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes C-bug Category: This is a bug I-integration-fail Continuous integration fails, including build and test failures
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants