Skip to content

✅⚡ Faster tests - #714

Merged
nevans merged 4 commits into
masterfrom
faster-tests
Jul 8, 2026
Merged

✅⚡ Faster tests#714
nevans merged 4 commits into
masterfrom
faster-tests

Conversation

@nevans

@nevans nevans commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

These changes allow the test_imap*.rb tests to run significantly faster.

On my laptop, they run over 60% faster, going from ~18 seconds down to ~11 seconds:

  • over 1 second faster: Disable TCP fast fallback in tests (only affects ruby >= 3.4)
  • over 2 seconds faster: More aggressively poll test server thread readiness
  • over 3 seconds faster: Use TCP_NODELAY in test server sockets
nevans added 4 commits July 8, 2026 16:54
This seemed to reduce the `test_imap*.rb` tests time by over a second.
Ideally, we'd remove all of these `Kernel#sleep` calls from the test
suite.  Until then, this is simple, effective, and not flaky.

This seems to cut down `test_imap*.rb` tests time by over two seconds.
This seems to cut down `test_imap*.rb` tests time by over three seconds!

Ideally, we'd should either compile the commands or use TCP_CORK (on
Linux).  Since this is only for tests against localhost, there's little
danger of slowing down throughput.
@nevans
nevans marked this pull request as ready for review July 8, 2026 21:25
@nevans
nevans merged commit 5d6ab6d into master Jul 8, 2026
39 checks passed
@nevans
nevans deleted the faster-tests branch July 8, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant