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

reenable flaky tests in magicendpoint #1183

Closed
dignifiedquire opened this issue Jul 7, 2023 · 1 comment
Closed

reenable flaky tests in magicendpoint #1183

dignifiedquire opened this issue Jul 7, 2023 · 1 comment

Comments

@dignifiedquire
Copy link
Contributor

No description provided.

dignifiedquire added a commit that referenced this issue Jul 7, 2023
* test(iroh-net): disable flaky MagicEndpoint tests

ref #1183

* fixup
flub added a commit that referenced this issue Jul 19, 2023
This brings back the MagicEndpoint connect-close test and attempts to
make it more reliable.

- Most importantly the client sends one message to the server before
  the server closes the connection.  This is a crucial bit of
  synchronisation for the interaction to be deterministic.

- Both client and server run in a task again.  Keeps things a bit more
  local.

- The endpoints are now created in the spawned tasks, this ensures we
  get nice span prefixes on all the logging for each thus
  distinguishing the log output.

- The run_derp_and_stun function is moved into test_utils.  Maybe it
  belongs better there?

- The run_derp_and_stun function now returns a drop guard for cleanup.
  This ensures that whatever happens to the test, regardless of
  assertions, the cleanup will run.  It does mean for a successful
  test the test will no longer delay exiting before the cleanup is
  finished (was already not the case for the STUN server).  This is
  fine though, the servers both bind to 127.0.0.1:0 so do not affect
  anything else while they are still shutting down.

- The run_derp_and_stun function now disables IPv6 in the returned
  DerpMap.  Previously it would trigger a DNS lookup.  But we only
  bind on IPv4 so skip this noise.

- A couple of minor logging output adjustments.

Part of #1183
@flub flub self-assigned this Jul 19, 2023
flub added a commit that referenced this issue Jul 24, 2023
This brings back the MagicEndpoint connect-close test and attempts to
make it more reliable.

- Most importantly the client sends one message to the server before
  the server closes the connection.  This is a crucial bit of
  synchronisation for the interaction to be deterministic.

- Both client and server run in a task again.  Keeps things a bit more
  local.

- The endpoints are now created in the spawned tasks, this ensures we
  get nice span prefixes on all the logging for each thus
  distinguishing the log output.

- The run_derp_and_stun function is moved into test_utils.  Maybe it
  belongs better there?

- The run_derp_and_stun function now returns a drop guard for cleanup.
  This ensures that whatever happens to the test, regardless of
  assertions, the cleanup will run.  It does mean for a successful
  test the test will no longer delay exiting before the cleanup is
  finished (was already not the case for the STUN server).  This is
  fine though, the servers both bind to 127.0.0.1:0 so do not affect
  anything else while they are still shutting down.

- The run_derp_and_stun function now disables IPv6 in the returned
  DerpMap.  Previously it would trigger a DNS lookup.  But we only
  bind on IPv4 so skip this noise.

- A couple of minor logging output adjustments.

- turn cleanups into "real" drop guards

Part of #1183
flub added a commit that referenced this issue Jul 26, 2023
I have sufficient information for now to work on improving this.  No
point in keeping a known flaky test in CI for now.

Part of #1183
github-merge-queue bot pushed a commit that referenced this issue Jul 26, 2023
I have sufficient information for now to work on improving this.  No
point in keeping a known flaky test in CI for now.

Part of #1183
@flub flub added the flaky-test label Jun 4, 2024
@matheus23
Copy link
Member

As far as I can tell, these tests are now enabled again:

iroh/iroh-net/src/endpoint.rs

Lines 1161 to 1164 in 1d3f3fa

#[tokio::test]
async fn endpoint_connect_close() {
let _guard = iroh_test::logging::setup();

rklaehn pushed a commit to n0-computer/iroh-blobs that referenced this issue Oct 22, 2024
* test(iroh-net): disable flaky MagicEndpoint tests

ref n0-computer/iroh#1183

* fixup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants