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

[EventCounter] Failing tests #941

Open
vishweshbankwar opened this issue Jan 31, 2023 · 3 comments
Open

[EventCounter] Failing tests #941

vishweshbankwar opened this issue Jan 31, 2023 · 3 comments
Labels
comp:instrumentation.eventcounters Things related to OpenTelemetry.Instrumentation.EventCounters

Comments

@vishweshbankwar
Copy link
Member

vishweshbankwar commented Jan 31, 2023

OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.PollingCounter()
Failed OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.PollingCounter [1 s]
Error Message:
Assert.Equal() Failure
Expected: 10
Actual: 20
Stack Trace:
at OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.PollingCounter() in D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\test\OpenTelemetry.Instrumentation.EventCounters.Tests\EventCountersMetricsTests.cs:line 107

https://github.com/open-telemetry/opentelemetry-dotnet-contrib/actions/runs/4051100460/jobs/6969093480

OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.IncrementingPollingCounter()
[xUnit.net 00:00:13.82] Finished: OpenTelemetry.Instrumentation.EventCounters.Tests
Failed OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.IncrementingPollingCounter [1 s]
Error Message:
Assert.Equal() Failure
Expected: 1
Actual: 2
Stack Trace:
at OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.IncrementingPollingCounter() in D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\test\OpenTelemetry.Instrumentation.EventCounters.Tests\EventCountersMetricsTests.cs:line 133

https://github.com/open-telemetry/opentelemetry-dotnet-contrib/actions/runs/4051195894/jobs/6969274662

@vishweshbankwar vishweshbankwar added the comp:instrumentation.eventcounters Things related to OpenTelemetry.Instrumentation.EventCounters label Jan 31, 2023
@vishweshbankwar vishweshbankwar changed the title Failing test [EventCounter] Failing tests Jan 31, 2023
@reyang
Copy link
Member

reyang commented Feb 8, 2023

@mic-max would you take a look?

@cijothomas
Copy link
Member

[xUnit.net 00:00:09.75] OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.PollingCounter [FAIL]
[xUnit.net 00:00:09.75] Assert.Equal() Failure
[xUnit.net 00:00:09.75] Expected: 10
[xUnit.net 00:00:09.75] Actual: 20
[xUnit.net 00:00:09.75] Stack Trace:
[xUnit.net 00:00:09.75] /home/runner/work/opentelemetry-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Instrumentation.EventCounters.Tests/EventCountersMetricsTests.cs(107,0): at OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.PollingCounter()
Failed OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.PollingCounter [1 s]
Error Message:
Assert.Equal() Failure
Expected: 10
Actual: 20
Stack Trace:
at OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.PollingCounter() in /home/runner/work/opentelemetry-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Instrumentation.EventCounters.Tests/EventCountersMetricsTests.cs:line 107
[xUnit.net 00:00:11.76] OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.IncrementingPollingCounter [FAIL]
[xUnit.net 00:00:11.76] Assert.Equal() Failure
[xUnit.net 00:00:11.76] Expected: 1
[xUnit.net 00:00:11.76] Actual: 2
[xUnit.net 00:00:11.76] Stack Trace:
[xUnit.net 00:00:11.76] /home/runner/work/opentelemetry-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Instrumentation.EventCounters.Tests/EventCountersMetricsTests.cs(133,0): at OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.IncrementingPollingCounter()
[xUnit.net 00:00:11.76] Finished: OpenTelemetry.Instrumentation.EventCounters.Tests
Passed OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.IncrementingEventCounter [1 s]
Failed OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.IncrementingPollingCounter [1 s]
Error Message:
Assert.Equal() Failure
Expected: 1
Actual: 2
Stack Trace:
at OpenTelemetry.Instrumentation.EventCounters.Tests.EventCountersMetricsTests.IncrementingPollingCounter() in /home/runner/work/opentelemetry-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Instrumentation.EventCounters.Tests/EventCountersMetricsTests.cs:line 133

@vishweshbankwar
Copy link
Member Author

I think the issue is surfacing due to EventCounter callback being called multiple times or not at all (before the asserts). Need to check if we can have a way around this to restrict callback to get called only once for testing purposes. @mic-max FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.eventcounters Things related to OpenTelemetry.Instrumentation.EventCounters
Projects
None yet
Development

No branches or pull requests

3 participants