Commit 160d535
authored
test(iroh): Fix
## Description
This reverts a change from this PR:
#3384
I originally thought I could make this test more reliable by pausing the
tokio time across the `tokio::time::timeout` calls, but it turns out
that actually makes the test *more* flaky:
- When time is paused, the timeout will immediately fire once the tokio
runtime has no more CPU work to do.
- It's possible that there's no CPU work to do anymore, while there's
something else that is actually still doing work, e.g. networking.
- Before the `ActiveRelayActor` finishes its `run_connected` loop, it
will call `client_sink.close().await`, which will do actual I/O. When
the tokio runtime is paused at that moment, it'll immediately trigger
the test's timeout.
## Notes & open questions
I couldn't reproduce this problem even across a couple thousand runs of
the test locally. I'm not super confident that this fixes things, but
I've analyzed the logs and this seems to be the most likely thing that's
happening to me.
Closes #3613
## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.test_active_relay_inactive test being flaky (#3680)1 parent d328bf2 commit 160d535
1 file changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
1462 | | - | |
1463 | 1462 | | |
1464 | 1463 | | |
1465 | 1464 | | |
| |||
1481 | 1480 | | |
1482 | 1481 | | |
1483 | 1482 | | |
1484 | | - | |
| 1483 | + | |
1485 | 1484 | | |
1486 | 1485 | | |
1487 | 1486 | | |
1488 | | - | |
| 1487 | + | |
1489 | 1488 | | |
1490 | 1489 | | |
1491 | 1490 | | |
| |||
1497 | 1496 | | |
1498 | 1497 | | |
1499 | 1498 | | |
1500 | | - | |
1501 | | - | |
1502 | 1499 | | |
1503 | 1500 | | |
1504 | 1501 | | |
| 1502 | + | |
1505 | 1503 | | |
| 1504 | + | |
1506 | 1505 | | |
1507 | 1506 | | |
1508 | 1507 | | |
| |||
1513 | 1512 | | |
1514 | 1513 | | |
1515 | 1514 | | |
| 1515 | + | |
1516 | 1516 | | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
1517 | 1522 | | |
1518 | | - | |
| 1523 | + | |
1519 | 1524 | | |
1520 | 1525 | | |
1521 | 1526 | | |
1522 | 1527 | | |
1523 | 1528 | | |
1524 | | - | |
1525 | 1529 | | |
1526 | 1530 | | |
1527 | 1531 | | |
| |||
0 commit comments