<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/net/http/transport_test.go, branch json-isValidNumber</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-02-17T23:54:47Z</updated>
<entry>
<title>net/http: remove five second timeout from TestTransportClosesBodyOnError</title>
<updated>2023-02-17T23:54:47Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2023-01-26T21:16:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7e5906a57d92e8afe8a6bb3f5d4c19d0e920ab9a'/>
<id>urn:sha1:7e5906a57d92e8afe8a6bb3f5d4c19d0e920ab9a</id>
<content type='text'>
Wait forever and let the test time out with a stack trace if the
expected response doesn't happen.

Fixes #57990

Change-Id: I835def63db113752cdd06e03e258cb10d63a6a25
Reviewed-on: https://go-review.googlesource.com/c/go/+/463222
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>net/http: close Request.Body when pconn write loop exits early</title>
<updated>2023-01-20T01:06:03Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2023-01-11T21:47:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=045b33ecfe4db7af6344cb5227c3d31501eb8cba'/>
<id>urn:sha1:045b33ecfe4db7af6344cb5227c3d31501eb8cba</id>
<content type='text'>
The pconn write loop closes a request's body after sending the
request, but in the case where the write loop exits with an
unsent request in writech the body is never closed.

Close the request body in this case.

Fixes #49621

Change-Id: Id94a92937bbfc0beb1396446f4dee32fd2059c7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/461675
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>net/http: improve errors in TestCancelRequestWhenSharingConnection</title>
<updated>2022-12-16T17:12:28Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-12-14T23:49:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f4b42f5cb8b494a2b64a4ade89f89071d80c7fd3'/>
<id>urn:sha1:f4b42f5cb8b494a2b64a4ade89f89071d80c7fd3</id>
<content type='text'>
Provide more information about why this test might be hanging waiting
for PutIdleConn to be called (#56587): If the round trip that should
result in PutIdleConn being invoked completes, report that to the
goroutine waiting for PutIdleConn.

For #56587

Change-Id: Ie476ea0ce4a48d2bda6b9b109f89d675a10e7e45
Reviewed-on: https://go-review.googlesource.com/c/go/+/457775
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>net/http: deflake TestIssue4191_InfiniteGetTimeout</title>
<updated>2022-11-19T01:19:55Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-11-18T22:10:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f4f8397fed02b612c36c425fc9c5dce32408e21b'/>
<id>urn:sha1:f4f8397fed02b612c36c425fc9c5dce32408e21b</id>
<content type='text'>
This test exercises the case where a net.Conn error occurs while
writing a response body. It injects an error by setting a timeout
on the Conn. If this timeout expires before response headers are
written, the test fails. The test attempts to recover from this
failure by extending the timeout and retrying.

Set the timeout after the response headers are removed, and
remove the retry loop.

Fixes #56274.

Change-Id: I293f8bedb7b20a21d14f43ea9bb48fc56b59441c
Reviewed-on: https://go-review.googlesource.com/c/go/+/452175
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>crypto/tls: add CertificateVerificationError to tls handshake</title>
<updated>2022-11-18T18:50:57Z</updated>
<author>
<name>Gabor Tanz</name>
<email>gabor.tanz@swisscom.com</email>
</author>
<published>2022-11-18T07:59:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f64c2a2ce5dc859315047184e310879dcf747d53'/>
<id>urn:sha1:f64c2a2ce5dc859315047184e310879dcf747d53</id>
<content type='text'>
Fixes #48152

Change-Id: I503f088edeb5574fd5eb5905bff7c3c23b2bc8fc
GitHub-Last-Rev: 2b0e982f3f6bca33062b0bbd64ed1804801e2c13
GitHub-Pull-Request: golang/go#56686
Reviewed-on: https://go-review.googlesource.com/c/go/+/449336
Run-TryBot: Roland Shoemaker &lt;roland@golang.org&gt;
Auto-Submit: Roland Shoemaker &lt;roland@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Julie Qiu &lt;julieqiu@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
<entry>
<title>net/http: add Transport.OnProxyConnectResponse</title>
<updated>2022-11-09T17:41:34Z</updated>
<author>
<name>cuiweixie</name>
<email>cuiweixie@gmail.com</email>
</author>
<published>2022-11-02T13:07:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2f4d5c3b791b9b78c32ad587a70adfc1b46f29e0'/>
<id>urn:sha1:2f4d5c3b791b9b78c32ad587a70adfc1b46f29e0</id>
<content type='text'>
Fixes #54299

Change-Id: I3a29527bde7ac71f3824e771982db4257234e9ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/447216
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: xie cui &lt;523516579@qq.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>net/http: deflake TestCancelRequestWhenSharingConnection</title>
<updated>2022-10-31T20:44:00Z</updated>
<author>
<name>Zeke Lu</name>
<email>lvzecai@gmail.com</email>
</author>
<published>2022-10-31T17:18:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e943dc5a8ccab90286d3882e5d13e9fa9516f243'/>
<id>urn:sha1:e943dc5a8ccab90286d3882e5d13e9fa9516f243</id>
<content type='text'>
The test sleeps for 1 millisecond to give the cancellation a moment
to take effect. This is flaky because the request can finish before
the cancellation of the context is seen. It's easy to verify by adding

    time.Sleep(2*time.Millisecond)

after https://github.com/golang/go/blob/0a6c4c87404ecb018faf002919e5d5db04c69ee2/src/net/http/transport.go#L2619.
With this modification, the test fails about 5 times out of 10 runs.

The fix is easy. We just need to block the handler of the second
request until this request is cancelled. I have verify that the
updated test can uncover the issue fixed by CL 257818.

Fixes #55226.

Change-Id: I81575beef1a920a2ffaa5c6a5ca70a4008bd5f94
GitHub-Last-Rev: 99cb1c2eaed7839394adbb6bbcd4950cd4bfb6f3
GitHub-Pull-Request: golang/go#56500
Reviewed-on: https://go-review.googlesource.com/c/go/+/446676
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>net/http: skip TestTransportPersistConnLeak/h2</title>
<updated>2022-10-14T16:41:21Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-10-14T15:31:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e9cdca9a24b63cba0560978fb48773b83805be25'/>
<id>urn:sha1:e9cdca9a24b63cba0560978fb48773b83805be25</id>
<content type='text'>
We started running this test under HTTP/2 in a recent refactoring.
It seems to be flaky for HTTP/2; skip it for now.

Change-Id: I8b270afe7f0d3db307b5a951e16f576116333003
Reviewed-on: https://go-review.googlesource.com/c/go/+/443075
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>net/http: fix some test flakes caused by test refactoring</title>
<updated>2022-10-12T18:11:14Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-10-12T15:28:06Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=5bef938125d8604593ccacc59474db0b1403f6aa'/>
<id>urn:sha1:5bef938125d8604593ccacc59474db0b1403f6aa</id>
<content type='text'>
Skip TestTransportPersistConnLeakShortBody in HTTP/2 mode;
it's flaky and was previously HTTP/1-only.

Don't run TestTransportEventTrace and TestTransportIgnores408
in parallel.

Change-Id: I76bc540fac9317185ef7d414c9deafb35bc926b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/442495
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>net/http: refactor tests to run most in HTTP/1 and HTTP/2 modes</title>
<updated>2022-10-07T16:53:14Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-10-03T23:07:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=747e1961e95c2eb3df62e045b90b111c2ceea337'/>
<id>urn:sha1:747e1961e95c2eb3df62e045b90b111c2ceea337</id>
<content type='text'>
Replace the ad-hoc approach to running tests in HTTP/1 and HTTP/2
modes with a 'run' function that executes a test in various modes.
By default, these modes are HTTP/1 and HTTP/2, but tests can
opt-in to HTTPS/1 as well.

The 'run' function also takes care of post-test cleanup (running the
afterTest function).

The 'run' function runs tests in parallel by default. Tests which
can't run in parallel (generally because they use global test hooks)
pass a testNotParallel option to disable parallelism.

Update clientServerTest to use t.Cleanup to clean up after itself,
rather than leaving this up to tests to handle.

Drop an unnecessary mutex in SetReadLoopBeforeNextReadHook.
Test hooks can't be set in parallel, and we want the race detector
to notify us if two simultaneous tests try to set a hook.

Fixes #56032

Change-Id: I16be64913c426fc93d84abc6ad85dbd3bc191224
Reviewed-on: https://go-review.googlesource.com/c/go/+/438137
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
</content>
</entry>
</feed>
