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

TestTimeout test in the go.opentelemetry.io/otel/exporters/otlp/otlphttp fails sporadically #1905

Closed
MrAlias opened this issue May 12, 2021 · 0 comments · Fixed by #1906
Closed
Assignees
Labels
bug Something isn't working

Comments

@MrAlias
Copy link
Contributor

MrAlias commented May 12, 2021

Description

2021-05-12T15:39:34.6691600Z --- FAIL: TestTimeout (0.83s)
2021-05-12T15:39:34.6790890Z     driver_test.go:191: 
2021-05-12T15:39:34.6891720Z         	Error Trace:	driver_test.go:191
2021-05-12T15:39:34.6992730Z         	Error:      	Not equal: 
2021-05-12T15:39:34.7089470Z         	            	expected: true
2021-05-12T15:39:34.7191690Z         	            	actual  : false
2021-05-12T15:39:34.7292350Z         	Test:       	TestTimeout
2021-05-12T15:39:34.7392480Z FAIL
2021-05-12T15:39:34.7494210Z FAIL	go.opentelemetry.io/otel/exporters/otlp/otlphttp	16.839s
2021-05-12T15:39:34.7573920Z make: *** [test] Error 1
2021-05-12T15:39:34.7574410Z FAIL

func TestTimeout(t *testing.T) {
mcCfg := mockCollectorConfig{
InjectDelay: 100 * time.Millisecond,
}
mc := runMockCollector(t, mcCfg)
defer mc.MustStop(t)
driver := otlphttp.NewDriver(
otlphttp.WithEndpoint(mc.Endpoint()),
otlphttp.WithInsecure(),
otlphttp.WithTimeout(50*time.Millisecond),
)
ctx := context.Background()
exporter, err := otlp.NewExporter(ctx, driver)
require.NoError(t, err)
defer func() {
assert.NoError(t, exporter.Shutdown(ctx))
}()
err = exporter.ExportSpans(ctx, otlptest.SingleReadOnlySpan())
assert.Equal(t, true, os.IsTimeout(err))
}

Environment

  • OS: Mac OS X 10.15.7
  • Architecture: amd64
  • Go Version: 1.15
  • opentelemetry-go version: b6d5442

Test Failure Logs

log.txt

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
Development

Successfully merging a pull request may close this issue.

1 participant