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

Flaky test: TestWait #2299

Closed
MrAlias opened this issue Oct 18, 2021 · 2 comments · Fixed by #2300
Closed

Flaky test: TestWait #2299

MrAlias opened this issue Oct 18, 2021 · 2 comments · Fixed by #2300
Assignees
Labels
bug Something isn't working
Projects

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Oct 18, 2021

Description

https://github.com/open-telemetry/opentelemetry-go/runs/3931346951?check_suite_focus=true

2021-10-18T20:06:05.5955681Z --- FAIL: TestWait (0.00s)
2021-10-18T20:06:05.5956675Z     retry_test.go:58: 
2021-10-18T20:06:05.5957379Z         	Error Trace:	retry_test.go:58
2021-10-18T20:06:05.5958052Z         	Error:      	Not equal: 
2021-10-18T20:06:05.5959213Z         	            	expected: *errors.errorString(&errors.errorString{s:"context canceled"})
2021-10-18T20:06:05.5960528Z         	            	actual  : <nil>(<nil>)
2021-10-18T20:06:05.5961187Z         	Test:       	TestWait
2021-10-18T20:06:05.5961735Z FAIL
2021-10-18T20:06:05.5963051Z FAIL	go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry	0.034s
2021-10-18T20:06:06.1576065Z ok  	go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform	0.032s
2021-10-18T20:06:06.1577837Z FAIL
2021-10-18T20:06:06.3127156Z mingw32-make: *** [Makefile:113: test] Error 123
2021-10-18T20:06:06.7569802Z ##[error]Process completed with exit code 1.

ctx: func() context.Context {
ctx, cancel := context.WithCancel(context.Background())
cancel()
return ctx
}(),
expected: context.Canceled,

Environment

  • OS: Microsoft Windows Server 2019 10.0.17763
  • Architecture: amd64
  • Go Version: 1.16
  • opentelemetry-go version: 69b88ab

log.txt

@MrAlias MrAlias added the bug Something isn't working label Oct 18, 2021
@MrAlias MrAlias added this to Needs triage in Bugs via automation Oct 18, 2021
@MrAlias MrAlias self-assigned this Oct 18, 2021
@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 18, 2021

This looks similar to #2289

This select statement will randomly return different errors when both cases are simultaneously satisfied.

select {
case <-ctx.Done():
return ctx.Err()
case <-timer.C:
}

@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 18, 2021

I'm able to reproduce this failure locally.

$ go test -run=TestWait -count 1000000 -failfast ./...
--- FAIL: TestWait (0.00s)
    retry_test.go:58:
        	Error Trace:	retry_test.go:58
        	Error:      	Not equal:
        	            	expected: *errors.errorString(&errors.errorString{s:"context canceled"})
        	            	actual  : <nil>(<nil>)
        	Test:       	TestWait
FAIL
FAIL	go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry	0.005s
FAIL

MrAlias added a commit to MrAlias/opentelemetry-go that referenced this issue Oct 18, 2021
Explicitly return nil if the wait time and the context deadline expire
simultaneously, instead of indeterminately the context error or nil, for
the retry wait function in the otlptrace/internal package.
@MrAlias MrAlias moved this from Needs triage to Low priority in Bugs Oct 20, 2021
Bugs automation moved this from Low priority to Closed Oct 21, 2021
MrAlias added a commit that referenced this issue Oct 21, 2021
Explicitly return nil if the wait time and the context deadline expire
simultaneously, instead of indeterminately the context error or nil, for
the retry wait function in the otlptrace/internal package.
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
Archived in project
Bugs
  
Closed
Development

Successfully merging a pull request may close this issue.

1 participant