731 Commits

Author SHA1 Message Date
gr1ffon
4ba42a8456 replace repo 2025-11-14 04:04:40 +03:00
Marten Seemann
a882b9a003 use synctest for the stateless reset tests (#5415) 2025-11-01 17:58:37 +01:00
Marten Seemann
7646b74b22 use synctest in handshake RTT tests (#5414) 2025-11-01 11:19:34 -04:00
Copilot
57f5dcb28f fix flaky TestServerTransportClose (#5407)
* Initial plan

* Fix TestServerTransportClose race condition by accepting conn1 before dialing conn2

Co-authored-by: marten-seemann <1478487+marten-seemann@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: marten-seemann <1478487+marten-seemann@users.noreply.github.com>
2025-10-24 18:24:01 +02:00
Marten Seemann
f2b845a2f5 use synctest for the timeout tests (#5403) 2025-10-24 12:51:09 +02:00
Marten Seemann
44db8994c9 use synctest for the datagram test (#5398) 2025-10-23 19:32:01 +02:00
Marten Seemann
49d41dc218 use synctest for the handshake drop test (#5397)
This test used to take 15-30s locally, and even more on CI. It now runs in less than 1ms.
2025-10-23 16:56:35 +02:00
Marten Seemann
756bdc0104 use synctest for the packet drop test (#5393) 2025-10-21 16:28:11 +02:00
Marten Seemann
c0611d2f56 use simnet in CONNECTION_CLOSE retransmission test (#5395)
* use simnet in CONNECTION_CLOSE retransmission test

* fix race
2025-10-20 08:44:09 +02:00
Marten Seemann
cb7f6adea0 use synctest for transport tests (#5391)
* use synctest for transport tests

* disable TestTransportReplaceWithClosed on Go 1.24
2025-10-19 09:51:01 +02:00
Marten Seemann
5e5100b40c http3: add the qlog event schema to trace header (#5383) 2025-10-15 06:02:05 +02:00
Marten Seemann
c26e86c547 qlogwriter: add support for event_schemas in the trace header (#5361) 2025-10-09 06:07:23 +02:00
Marten Seemann
c2131eb595 qlog: split serializiation and event definitions, remove logging abstraction (#5356)
* qlog: implement a Trace and a Writer struct

* qlog: rename Trace to FileSeq

* split qlog trace writer and QUIC qlog events into separate packages

* use the new qlog.Recorder instead of the logging.ConnectionTracer
2025-10-08 05:53:02 +02:00
Marten Seemann
2ac3b16df4 improve connection timer logic (#5339)
* simplify timer resets

As of Go 1.23, timer resets work as expected, and there’s no need to
read a (potentially) stale value from the timer channel.

* don't save the last time

* track if blocked

* remove unblock after sendingScheduled

* fix unblock logic when sending

* don't use fallthrough

* track the blocking mode

* remove stale comment
2025-09-24 10:43:01 +02:00
Marten Seemann
44869e6823 add a benchmark test for data transfers (#5335) 2025-09-20 12:23:50 +02:00
Marten Seemann
adc13be540 implement a memory-optimized time.Time replacement (#5334)
* implement a memory-optimized time.Time replacement

* monotime: properly handle systems with bad timer resolution (Windows)

* monotime: simplify Since
2025-09-14 08:12:10 +02:00
Glonee
0ae8c03816 http3: don't allow usage of closed Transport (#5324)
* do not allow use a closed transport

* update tests

* add test

* Update http3/transport.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* unit tests

* update test

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-09-07 12:52:25 +02:00
Marten Seemann
8c062ae604 use testing.B.Loop in all benchmark tests (#5285)
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -category=bloop -fix -test ./...
was used as a starting point.
2025-08-16 12:44:56 +02:00
Marten Seemann
fea19fc3ec update to Go 1.25, drop Go 1.23, use go tool for gomock (#5283)
* update to Go 1.25, drop support for Go 1.23

* ci: update golangci-lint to v2.4.0

* use new go tool command for gomock / mockgen

* also update Go version used for oss-fuzz
2025-08-16 06:14:01 +02:00
Marten Seemann
fd32cf5c69 fix flaky TestPostQuantumClientHello (#5253) 2025-06-29 07:09:45 +02:00
Marten Seemann
3f3d3099b7 fix flaky TestDrainServerAcceptQueue (#5247)
The connections are not necessarily accepted in the same order that
they are dialed.
2025-06-28 09:37:18 +02:00
Marten Seemann
e629a12d06 drain server accept queue when the transport is closed (#5237)
* drain server queue on transport close

* add integration test for clearing conn queue

* improve documentation and test for Transport.Close

* move to handshake_test.go

---------

Co-authored-by: sukun <sukunrt@gmail.com>
2025-06-24 15:20:23 +02:00
Marten Seemann
92aa7b41d5 handshake: store key update interval in an atomic (#5234)
* handshake: store key update interval in an atomic

We recently changed the way the key update interval is set in tests to
use an environment variable. This resolved a race condition that existed
in the earlier logic, however, parsing of the environment variable now
shows up in benchmark tests.

Using an atomic variable should have a negligible performance impact.

* use an atomic swap
2025-06-21 12:14:07 +02:00
Marten Seemann
aa22706d78 ci: enable the nolintlint linter (#5221)
This linter helps us find unneeded nolint statements.
2025-06-11 06:52:21 +02:00
Marten Seemann
6c82ac07cf http3: convert Connection interface to Conn struct (#5204) 2025-06-09 12:16:07 +02:00
Marten Seemann
5f3d617dec convert Connection interface to Conn struct (#5195) 2025-06-09 11:51:46 +02:00
Marten Seemann
08be0f73c0 ci: stop using Ginkgo test command (#5194)
* ci: stop using Ginkgo test command

* ci: remove integrationtest directory for unit tests
2025-06-02 04:38:05 +02:00
Marten Seemann
1169d97e81 convert ReceiveStream interface to a struct (#5173) 2025-06-01 06:08:18 +02:00
Marten Seemann
78e77bcfdb convert SendStream to a struct (#5172) 2025-06-01 05:53:53 +02:00
Marten Seemann
eb656df2fe convert Stream interface to a struct (#5149) 2025-06-01 05:40:05 +02:00
Marten Seemann
7ca7a973ef avoid triggering macOS dual-stack flakiness in HTTP/3 integration tests (#5187)
Unfortunately, there’s still no fix in sight for https://github.com/golang/go/issues/67226.
2025-05-31 10:40:20 +02:00
Marten Seemann
d5f5dfa9d3 fix flaky TestGracefulShutdownPendingStreams (#5179) 2025-05-31 07:33:57 +02:00
Marten Seemann
1d58651358 fix flaky TestHTTPRequestAfterGracefulShutdown (#5178) 2025-05-31 07:31:20 +02:00
Marten Seemann
06ee16ee67 fix flaky TestDatagramLoss (#5174) 2025-05-31 05:01:47 +02:00
Marten Seemann
5c3af443c1 http3: simplify HTTP datagram handling (#5156) 2025-05-29 06:23:05 +02:00
Marten Seemann
2675d0845f http3: convert RequestStream from an interface to a struct (#5153) 2025-05-29 05:08:39 +02:00
Marten Seemann
04eab22893 http3: fix off-by-one error when processing the GOAWAY stream ID (#5145) 2025-05-20 08:43:33 +02:00
Marten Seemann
363e0ccafb http3: implement client-side GOAWAY handling (#5143)
When receiving a GOAWAY frame, the client:
* immediately closes the connection if there are no active requests
* refuses to open streams with stream IDs larger than the stream ID in
the GOAWAY frame
* closes the connection once the stream count drops to zero
2025-05-18 07:33:43 +02:00
sukun
eb8547ca73 pass ClientInfo to Transport.ConnContext, allow rejection of handshake (#5122)
* pass *ClientInfo to ConnContext

This allows users to set some state related to the client's remote
address in `ConnContext`.

This also refuses connection early if the returned context is cancelled.

* review comments

* better error assertion

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-05-16 12:03:05 +02:00
Marten Seemann
77c401dcbb http3: only retry requests for which it is safe to do so (#5141)
* add an integration test for HTTP/3 redialing logic

* http3: only retry requests for which it is safe to do so
2025-05-16 05:22:13 +02:00
Marten Seemann
d7ca54c602 fix flaky TestHandshakeCloseListener (#5140) 2025-05-11 06:54:28 +02:00
Marten Seemann
1725cb0878 http3: close QUIC listeners created by Server on graceful shutdown (#5101) 2025-05-08 08:22:11 +02:00
Marten Seemann
8296ba7d19 http3: don't close QUIC listeners created by the application (#5129) 2025-05-08 07:40:23 +02:00
Marten Seemann
f3f476a908 never close accepted connections when the listener is closed (#5108) 2025-05-06 05:18:44 +02:00
Marten Seemann
cfc6c16f36 fix race condition in tests when setting the key update interval (#5121)
* fix race conditions in tests when setting the key update interval

* remove test for running transports and handshakes
2025-05-06 04:45:27 +02:00
Marten Seemann
4c6aca6b43 remove stray assertion that handshakes are running from tests (#5123)
The RunHandshake method this function was basing its assertion on was
removed a long time ago.
2025-05-06 09:13:38 +07:00
Marten Seemann
44207b8e72 http3: reset request streams accepted after graceful shutdown (#5116)
* http3: reset request streams accepted after graceful shutdown

The server needs to let the client know that these streams
are not getting processed, using the H3_REQUEST_REJECTED
error code.

* add an integration test for graceful shutdown stream cancellations
2025-05-05 04:28:01 +02:00
Marten Seemann
9b3ff059fc delete closed connections after 3 PTOs (#5117)
In most cases, this should be earlier than the current
timeout value of 5s.
2025-05-04 12:51:39 +02:00
Marten Seemann
b3f55bb7b7 use assert.AnError consistently in tests (#5066)
No functional change expected.
2025-04-21 03:52:08 +02:00
Marten Seemann
d35b5ac187 use ed25519 instead of RSA in tests and examples (#5050)
Also adds a golangci-lint depguard rules that forbids
importing crypto/rsa.
2025-04-20 05:55:08 +02:00