Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

TestDatagrams fails intermittently when only ~64/100 datagrams are received before session closure, below the 80% threshold.

Changes

  • Increased wait time from 10ms to 100ms (50ms → 500ms in CI with scaleDuration multiplier)

The original timing was insufficient for datagram delivery through the network stack, particularly under CI resource constraints. UDP datagrams need time to traverse the stack before the session closes.

// Before
time.Sleep(scaleDuration(10 * time.Millisecond))

// After  
time.Sleep(scaleDuration(100 * time.Millisecond))
Original prompt

This section details on the original issue you should resolve

<issue_title>flaky TestDatgrams</issue_title>
<issue_description>```
=== RUN TestDatagrams
webtransport_test.go:710: sent: 100, received: 64
webtransport_test.go:711:
Error Trace: /Users/runner/work/webtransport-go/webtransport-go/webtransport_test.go:711
Error: "64" is not greater than "80"
Test: TestDatagrams
--- FAIL: TestDatagrams (0.06s)</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@macroscopeapp
Copy link
Contributor

macroscopeapp bot commented Jan 8, 2026

Adjust blank-line formatting in TestDatagrams to prepare threshold fix for flaky behavior

Modify only whitespace by changing blank lines in test files related to TestDatagrams.

📍Where to Start

Start with the TestDatagrams test definition in tests/datagrams_test.go.


Macroscope summarized 4276b97. (Automatic summaries will resume when PR exits draft mode or review begins).

Increase the wait time from 10ms to 100ms to allow more time for
datagrams to be received and processed before closing the session.
This gives datagrams sufficient time to traverse the network stack,
especially in CI environments where the scaleDuration multiplier
makes this 500ms (5x multiplier).

The original 10ms (50ms in CI) was too short, causing the test
to fail when only 64 out of 100 datagrams were received before
the session was closed. With 100ms (500ms in CI), all 100 datagrams
are consistently received.

Co-authored-by: marten-seemann <[email protected]>
Copilot AI changed the title [WIP] Fix flaky TestDatagrams by adjusting threshold Fix flaky TestDatagrams by increasing wait time 10x Jan 8, 2026
Copilot AI requested a review from marten-seemann January 8, 2026 03:30
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.

flaky TestDatgrams

2 participants