census-instrumentation/opencensus-go

Test_Worker_MultiExport intermittently fails: Mismatched value

drew-parsons opened this issue · 0 comments

What version of OpenCensus are you using?

OpenCensus 0.22.4 (debian build 0.22.4-1)

What version of Go are you using?

golang 1.15 (debian build 1.15.8-3)

What did you do?

The error is triggered intermittently in routine CI test runs (https://ci.debian.net/packages/g/golang-go.opencensus/).

The failing test (Test_Worker_MultiExport) can be launched with

go test -vet=off -v -p 48 go.opencensus.io/stats/view

The documented test failures were launched via

go install -trimpath -v -p 48 go.opencensus.io go.opencensus.io/exporter/stackdriver/propagation go.opencensus.io/internal go.opencensus.io/internal/readme go.opencensus.io/internal/tagencoding go.opencensus.io/internal/testpb go.opencensus.io/metric go.opencensus.io/metric/metricdata go.opencensus.io/metric/metricexport go.opencensus.io/metric/metricproducer go.opencensus.io/metric/test go.opencensus.io/plugin/ocgrpc go.opencensus.io/plugin/ochttp go.opencensus.io/plugin/ochttp/propagation/b3 go.opencensus.io/plugin/ochttp/propagation/tracecontext go.opencensus.io/plugin/runmetrics go.opencensus.io/resource go.opencensus.io/resource/resourcekeys go.opencensus.io/stats go.opencensus.io/stats/internal go.opencensus.io/stats/view go.opencensus.io/tag go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate go.opencensus.io/zpages go.opencensus.io/zpages/internal

followed by

go test -vet=off -v -p 48 go.opencensus.io go.opencensus.io/exporter/stackdriver/propagation go.opencensus.io/internal go.opencensus.io/internal/readme go.opencensus.io/internal/tagencoding go.opencensus.io/internal/testpb go.opencensus.io/metric go.opencensus.io/metric/metricdata go.opencensus.io/metric/metricexport go.opencensus.io/metric/metricproducer go.opencensus.io/metric/test go.opencensus.io/plugin/ocgrpc go.opencensus.io/plugin/ochttp go.opencensus.io/plugin/ochttp/propagation/b3 go.opencensus.io/plugin/ochttp/propagation/tracecontext go.opencensus.io/plugin/runmetrics go.opencensus.io/resource go.opencensus.io/resource/resourcekeys go.opencensus.io/stats go.opencensus.io/stats/internal go.opencensus.io/stats/view go.opencensus.io/tag go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate go.opencensus.io/zpages go.opencensus.io/zpages/internal

Because of the intermittent nature of the error, I do not know how to reproduce the error consistently.

What did you expect to see?

Tests should complete cleanly with no errors.

What did you see instead?

Most of the time tests complete successfully as expected. But occasionally (approximately 1 test in 15 over a timeframe of months), Test_Worker_MultiExport fails with the error message:

=== RUN   Test_Worker_MultiExport
    worker_test.go:216: Mismatched value (want &{2}, got 1) for &{[{a true}] [{2021-02-17 20:29:04.697313865 +0000 UTC m=+1.008831196 1}] 2021-02-17 20:29:04.697255195 +0000 UTC m=+1.008772569} in "/VF1"
    worker_test.go:221: Mismatched value (want &{7.500000}, got 2.000000) for &{[] [{2021-02-17 20:29:04.697313865 +0000 UTC m=+1.008831196 2}] 2021-02-17 20:29:04.697258298 +0000 UTC m=+1.008775632} in "/VF2"
--- FAIL: Test_Worker_MultiExport (0.00s)

The same occurs occurs intermittently on different arches, including amd64 (sample log), and arm64 (sample log)