Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible flake with unit test: TestReceiverReceive #3222

Closed
vaikas opened this issue May 28, 2020 · 4 comments · Fixed by #3250
Closed

Possible flake with unit test: TestReceiverReceive #3222

vaikas opened this issue May 28, 2020 · 4 comments · Fixed by #3250
Assignees
Labels
area/test-and-release Test infrastructure, tests or release kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@vaikas
Copy link
Contributor

vaikas commented May 28, 2020

Describe the bug
https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_eventing/3212/pull-knative-eventing-unit-tests/1266085156708421633

Expected behavior
Test not to flake.

To Reproduce
Just seen this a few times while doing testing.

Knative release version
HEAD

Additional context
Add any other context about the problem here such as proposed priority

@vaikas vaikas added the kind/bug Categorizes issue or PR as related to a bug. label May 28, 2020
@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020

From the head, you can repro this with:
go test -race -count=1000 -run ^TestReceiverReceive$ ./test/upgrade/prober/wathola/receiver/...

FAIL
FAIL	knative.dev/eventing/test/upgrade/prober/wathola/receiver	27.402s
FAIL

@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020

Failures from the above tests:

{"level":"info","ts":1590694822.310598,"caller":"client/receiver.go:60","msg":"Listening for events on port 49152"}
{"level":"error","ts":1590694822.310925,"logger":"fallback","caller":"client/client.go:204","msg":"Error while opening the inbound connection: listen tcp :49152: bind: address already in use","stacktrace":"github.com/cloudevents/sdk-go/v2/client.(*ceClient).StartReceiver.func2\n\t/Users/vaikas/projects/go/pkg/mod/github.com/cloudevents/sdk-go/v2@v2.0.0/client/client.go:204"}
{"level":"info","ts":1590694822.313632,"caller":"client/receiver.go:63","msg":"Stopping event receiver on port 49152"}
--- FAIL: TestReceiverReceive (0.00s)
    services_test.go:64: 
        	Error Trace:	services_test.go:64
        	            				services_test.go:46
        	Error:      	Received unexpected error:
        	            	Post "http://localhost:49152/": dial tcp [::1]:49152: connect: connection refused
        	Test:       	TestReceiverReceive
    services_test.go:64: 
        	Error Trace:	services_test.go:64
        	            				services_test.go:47
        	Error:      	Received unexpected error:
        	            	Post "http://localhost:49152/": dial tcp [::1]:49152: connect: connection refused
        	Test:       	TestReceiverReceive
    services_test.go:51: 
        	Error Trace:	services_test.go:51
        	Error:      	Not equal: 
        	            	expected: 1
        	            	actual  : 0
        	Test:       	TestReceiverReceive
    services_test.go:52: 
        	Error Trace:	services_test.go:52
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 1
        	Test:       	TestReceiverReceive
{"level":"info","ts":1590694822.314145,"caller":"config/reader.go:40","msg":"Define config file to be taken into account: /Users/vaikas/.config/wathola/config.toml"}
{"level":"info","ts":1590694822.3148758,"caller":"client/receiver.go:60","msg":"Listening for events on port 49163"}
{"level":"error","ts":1590694822.3151438,"logger":"fallback","caller":"client/client.go:204","msg":"Error while opening the inbound connection: listen tcp :49163: bind: address already in use","stacktrace":"github.com/cloudevents/sdk-go/v2/client.(*ceClient).StartReceiver.func2\n\t/Users/vaikas/projects/go/pkg/mod/github.com/cloudevents/sdk-go/v2@v2.0.0/client/client.go:204"}
{"level":"info","ts":1590694822.318367,"caller":"client/receiver.go:63","msg":"Stopping event receiver on port 49163"}
--- FAIL: TestReceiverReceive (0.00s)
    services_test.go:64: 
        	Error Trace:	services_test.go:64
        	            				services_test.go:46
        	Error:      	Received unexpected error:
        	            	Post "http://localhost:49163/": dial tcp [::1]:49163: connect: connection refused
        	Test:       	TestReceiverReceive
    services_test.go:64: 
        	Error Trace:	services_test.go:64
        	            				services_test.go:47
        	Error:      	Received unexpected error:
        	            	Post "http://localhost:49163/": dial tcp [::1]:49163: connect: connection refused
        	Test:       	TestReceiverReceive
    services_test.go:51: 
        	Error Trace:	services_test.go:51
        	Error:      	Not equal: 
        	            	expected: 1
        	            	actual  : 0
        	Test:       	TestReceiverReceive
    services_test.go:52: 
        	Error Trace:	services_test.go:52
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 1
        	Test:       	TestReceiverReceive

@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020

@cardil would you mind taking a looksie?

@cardil
Copy link
Contributor

cardil commented May 29, 2020

/assign @cardil

@lberk lberk added area/test-and-release Test infrastructure, tests or release priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release Test infrastructure, tests or release kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants