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

TestGatherMetrics_EndToEnd is unstable #958

Closed
tigrannajaryan opened this issue May 12, 2020 · 6 comments · Fixed by #1328
Closed

TestGatherMetrics_EndToEnd is unstable #958

tigrannajaryan opened this issue May 12, 2020 · 6 comments · Fixed by #1328
Assignees
Labels
bug Something isn't working

Comments

@tigrannajaryan
Copy link
Member

tigrannajaryan commented May 12, 2020

The test appears to be timing sensitive. Fails on my machine with the following:

--- FAIL: TestGatherMetrics_EndToEnd (0.19s)
    hostmetrics_receiver_test.go:106: 
        	Error Trace:	hostmetrics_receiver_test.go:106
        	Error:      	Not equal: 
        	            	expected: 5
        	            	actual  : 4
        	Test:       	TestGatherMetrics_EndToEnd
    hostmetrics_receiver_test.go:119: 
        	Error Trace:	hostmetrics_receiver_test.go:119
        	Error:      	Not equal: 
        	            	expected: 12
        	            	actual  : 7
        	Test:       	TestGatherMetrics_EndToEnd
    hostmetrics_receiver_test.go:121: 
        	Error Trace:	hostmetrics_receiver_test.go:121
        	Error:      	"map[host/cpu/time:%!s(bool=true) host/disk/bytes:%!s(bool=true) host/disk/ops:%!s(bool=true) host/disk/time:%!s(bool=true) host/filesystem/inodes/used:%!s(bool=true) host/filesystem/used:%!s(bool=true) host/memory/used:%!s(bool=true)]" does not contain "host/network/packets"
        	Test:       	TestGatherMetrics_EndToEnd
    hostmetrics_receiver_test.go:121: 
        	Error Trace:	hostmetrics_receiver_test.go:121
        	Error:      	"map[host/cpu/time:%!s(bool=true) host/disk/bytes:%!s(bool=true) host/disk/ops:%!s(bool=true) host/disk/time:%!s(bool=true) host/filesystem/inodes/used:%!s(bool=true) host/filesystem/used:%!s(bool=true) host/memory/used:%!s(bool=true)]" does not contain "host/network/dropped_packets"
        	Test:       	TestGatherMetrics_EndToEnd
    hostmetrics_receiver_test.go:121: 
        	Error Trace:	hostmetrics_receiver_test.go:121
        	Error:      	"map[host/cpu/time:%!s(bool=true) host/disk/bytes:%!s(bool=true) host/disk/ops:%!s(bool=true) host/disk/time:%!s(bool=true) host/filesystem/inodes/used:%!s(bool=true) host/filesystem/used:%!s(bool=true) host/memory/used:%!s(bool=true)]" does not contain "host/network/errors"
        	Test:       	TestGatherMetrics_EndToEnd
    hostmetrics_receiver_test.go:121: 
        	Error Trace:	hostmetrics_receiver_test.go:121
        	Error:      	"map[host/cpu/time:%!s(bool=true) host/disk/bytes:%!s(bool=true) host/disk/ops:%!s(bool=true) host/disk/time:%!s(bool=true) host/filesystem/inodes/used:%!s(bool=true) host/filesystem/used:%!s(bool=true) host/memory/used:%!s(bool=true)]" does not contain "host/network/bytes"
        	Test:       	TestGatherMetrics_EndToEnd
    hostmetrics_receiver_test.go:121: 
        	Error Trace:	hostmetrics_receiver_test.go:121
        	Error:      	"map[host/cpu/time:%!s(bool=true) host/disk/bytes:%!s(bool=true) host/disk/ops:%!s(bool=true) host/disk/time:%!s(bool=true) host/filesystem/inodes/used:%!s(bool=true) host/filesystem/used:%!s(bool=true) host/memory/used:%!s(bool=true)]" does not contain "host/network/tcp_connections"
        	Test:       	TestGatherMetrics_EndToEnd
FAIL
FAIL	github.com/open-telemetry/opentelemetry-collector/receiver/hostmetricsreceiver	1.531s

This is running on Mac OS X 10.14.6, go version go1.14.1 darwin/amd64

@tigrannajaryan
Copy link
Member Author

@james-bebbington will you be able to look into this?

@james-bebbington
Copy link
Member

Yup - I'll look into this today

@tigrannajaryan
Copy link
Member Author

Thanks!

@flands flands added the bug Something isn't working label May 13, 2020
@flands flands added this to To do in Triaged via automation May 13, 2020
@james-bebbington
Copy link
Member

Fixed in #952

@tigrannajaryan tigrannajaryan added this to To do in Collector May 19, 2020
Triaged automation moved this from To do to Done Jun 3, 2020
Collector automation moved this from To do to Done Jun 3, 2020
@tigrannajaryan tigrannajaryan reopened this Jul 1, 2020
Triaged automation moved this from Done to In progress Jul 1, 2020
@tigrannajaryan
Copy link
Member Author

tigrannajaryan commented Jul 1, 2020

Failed again locally on latest master:

--- FAIL: TestGatherMetrics_EndToEnd (1.00s)
    hostmetrics_receiver_test.go:119: 
        	Error Trace:	hostmetrics_receiver_test.go:119
        	Error:      	Condition never satisfied
        	Test:       	TestGatherMetrics_EndToEnd
        	Messages:   	No metrics were collected after 1s
FAIL
FAIL	go.opentelemetry.io/collector/receiver/hostmetricsreceiver	2.403s

@james-bebbington
Copy link
Member

I put out a fix to increase the maximum wait time. I'm surprised it didn't complete after 1s though. What OS are you running on? Mac?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Collector
  
Done
Triaged
  
In progress
Development

Successfully merging a pull request may close this issue.

3 participants