Skip to content

[Flaky test][tcpcheckreceiver] TestScraper_ErrorEnumCounts failed on Windows #47826

@songy23

Description

@songy23

Component(s)

receiver/tcpcheck

What happened?

Example failure: https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/24727605419/job/72335756813

=== Failed
=== FAIL: . TestScraper_ErrorEnumCounts (1.00s)
Error closing listener: close tcp 127.0.0.1:8081: use of closed network connection

=== Debug Metrics ===
ResourceMetrics[0]:
  ScopeMetrics[0]:
    Metric: tcpcheck.error
      DataPoints: 2
        DataPoint[0]:
          Value: 3
          Attribute: tcpcheck.endpoint = invalid:host
          Attribute: error.code = invalid_endpoint
        DataPoint[1]:
          Value: 6
          Attribute: tcpcheck.endpoint = 1.2.3.4:80
          Attribute: error.code = connection_timeout
    Metric: tcpcheck.status

=== Error Counts ===
Error code 'invalid_endpoint': 3
Error code 'connection_timeout': 6
    scraper_test.go:380: 
        	Error Trace:	C:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:380
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 3
        	Test:       	TestScraper_ErrorEnumCounts
        	Messages:   	Expected 2 invalid_endpoint errors

This has been failing consistently on Windows

Collector version

mainline

Environment information

No response

OpenTelemetry Collector configuration

Log output

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions