open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.03k stars 2.35k forks source link

[Flaky test][exporter/elasticsearch] TestExporterMetrics flaky on Windows #35924

Open songy23 opened 4 days ago

songy23 commented 4 days ago

Component(s)

exporter/elasticsearch

Describe the issue you're reporting

E.g. https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/11453791269/job/31866855448


                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -1,2 +1,2 @@
                            -(map[string]interface {}) (len=5) {
                            +(map[string]interface {}) (len=6) {
                              (string) (len=10) "@timestamp": (string) (len=30) "1970-01-01T01:00:00.000000000Z",
                            @@ -8,16 +8,3 @@
                              (string) (len=7) "metrics": (map[string]interface {}) (len=1) {
                            -  (string) (len=10) "metric.foo": (map[string]interface {}) (len=2) {
                            -   (string) (len=6) "counts": ([]interface {}) (len=4) {
                            -    (float64) 4,
                            -    (float64) 5,
                            -    (float64) 6,
                            -    (float64) 7
                            -   },
                            -   (string) (len=6) "values": ([]interface {}) (len=4) {
                            -    (float64) 2,
                            -    (float64) 4.5,
                            -    (float64) 5.5,
                            -    (float64) 6
                            -   }
                            -  }
                            +  (string) (len=10) "metric.sum": (float64) 1.5
                              },
                            @@ -28,3 +15,4 @@
                               (string) (len=24) "dropped_attributes_count": (float64) 0
                            - }
                            + },
                            + (string) (len=15) "start_timestamp": (string) (len=30) "1970-01-01T02:00:00.000000000Z"
                             }
            Test:           TestExporterMetrics/otel_mode
            Messages:       item 1 document

=== FAIL: . TestExporterMetrics (0.26s)
panic: runtime error: index out of range [2] with length 2 [recovered]
    panic: runtime error: index out of range [2] with length 2

goroutine 673 [running]:
testing.tRunner.func1.2({0x141797520, 0xc0000bb9b0})
    C:/hostedtoolcache/windows/go/1.22.8/x64/src/testing/testing.go:1631 +0x3f7
testing.tRunner.func1()
    C:/hostedtoolcache/windows/go/1.22.8/x64/src/testing/testing.go:1634 +0x6b6
panic({0x141797520?, 0xc0000bb9b0?})
    C:/hostedtoolcache/windows/go/1.22.8/x64/src/runtime/panic.go:770 +0x132
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter.assertItemsEqual(0xc0001e2340, {0xc00027dcd0, 0x4, 0xc0002a00c0?}, {0xc00007c6c0, 0x2, 0x14005b1e0?}, 0x0)
    D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/elasticsearchexporter/utils_test.go:55 +0x65e
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter.TestExporterMetrics.func10(0xc0001e2340)
    D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/elasticsearchexporter/exporter_test.go:1200 +0x3025
testing.tRunner(0xc0001e2340, 0x1418d20a0)
    C:/hostedtoolcache/windows/go/1.22.8/x64/src/testing/testing.go:1689 +0x21f
created by testing.(*T).Run in goroutine 540
    C:/hostedtoolcache/windows/go/1.22.8/x64/src/testing/testing.go:1742 +0x826

=== FAIL: . TestConfig (unknown)
github-actions[bot] commented 4 days ago

Pinging code owners: