Skip to content

net/http: flaky tests on macOS Sierra #18541

Closed
@rsc

Description

@rsc

If I run:

for i in $(seq 100)
do
	if go test -v -short >out.$i 2>&1
	then
		echo pass
	else
		echo fail out.$i
	fi
done

Then I have yet to get 100 passes in a row. Usually I don't even get 10 in a row. There are two failure modes right now.

The first is:

--- FAIL: TestServerEmptyBodyRace_h1 (0.01s)
	serve_test.go:3798: Get http://127.0.0.1:53482: read tcp 127.0.0.1:53484->127.0.0.1:53482: read: connection reset by peer
	serve_test.go:3811: handler ran 19 times; want 20

and the second is for TestTransportPersistConnLeak to hang and cause the process to be killed by the 10 minute watchdog. I suspect that's the same problem, but the test is not written to cope correctly with failures from Get. Working on that.

This issue is about why we get "read: connection reset by peer" so consistently on macOS Sierra. Maybe it's a flaky test but it seems like maybe more.

/cc @bradfitz

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeOS-DarwinTestingAn issue that has been verified to require only test changes, not just a test failure.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions