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

Flaky test #977

Closed
cijothomas opened this issue Feb 7, 2023 · 3 comments
Closed

Flaky test #977

cijothomas opened this issue Feb 7, 2023 · 3 comments

Comments

@cijothomas
Copy link
Member

[xUnit.net 00:00:00.53] Starting: OpenTelemetry.Extensions.Tests
[xUnit.net 00:00:00.86] OpenTelemetry.Extensions.Tests.Trace.AutoFlushActivityProcessorTests.AutoFlushActivityProcessor_FlushAfterLocalServerSideRootSpans_EndMatchingSpan_Flush [FAIL]
[xUnit.net 00:00:00.86] Moq.MockException :
[xUnit.net 00:00:00.86] Expected invocation on the mock once, but was 2 times: mock => mock.OnForceFlush(5000)
[xUnit.net 00:00:00.86]
[xUnit.net 00:00:00.86] Performed invocations:
[xUnit.net 00:00:00.86]
[xUnit.net 00:00:00.86] Mock<BaseProcessor:1> (mock):
[xUnit.net 00:00:00.86]
[xUnit.net 00:00:00.86] BaseProcessor.SetParentProvider(TracerProviderSdk)
[xUnit.net 00:00:00.86] BaseProcessor.SetParentProvider(TracerProviderSdk)
[xUnit.net 00:00:00.86] BaseProcessor.OnStart(Activity)
[xUnit.net 00:00:00.86] BaseProcessor.OnStart(Activity)
[xUnit.net 00:00:00.86] BaseProcessor.OnEnd(Activity)
[xUnit.net 00:00:00.86] BaseProcessor.OnForceFlush(5000)
[xUnit.net 00:00:00.86] BaseProcessor.OnEnd(Activity)
[xUnit.net 00:00:00.86] BaseProcessor.OnForceFlush(5000)
[xUnit.net 00:00:00.86]
[xUnit.net 00:00:00.86] Stack Trace:
[xUnit.net 00:00:00.86] C:\projects\moq4\src\Moq\Mock.cs(330,0): at Moq.Mock.Verify(Mock mock, LambdaExpression expression, Times times, String failMessage)
[xUnit.net 00:00:00.86] C:\projects\moq4\src\Moq\Protected\ProtectedMock.cs(234,0): at Moq.Protected.ProtectedMock1.InternalVerify(String methodName, Type[] genericTypeArguments, Times times, Boolean exactParameterMatch, Object[] args) [xUnit.net 00:00:00.86] C:\projects\moq4\src\Moq\Protected\ProtectedMock.cs(206,0): at Moq.Protected.ProtectedMock1.Verify(String methodName, Times times, Object[] args)
[xUnit.net 00:00:00.86] D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\test\OpenTelemetry.Extensions.Tests\Trace\AutoFlushActivityProcessorTests.cs(45,0): at OpenTelemetry.Extensions.Tests.Trace.AutoFlushActivityProcessorTests.AutoFlushActivityProcessor_FlushAfterLocalServerSideRootSpans_EndMatchingSpan_Flush()

@cijothomas
Copy link
Member Author

Failed OpenTelemetry.Extensions.Tests.Trace.AutoFlushActivityProcessorTests.AutoFlushActivityProcessor_FlushAfterLocalServerSideRootSpans_EndMatchingSpan_Flush [151 ms]
Error Message:
Moq.MockException :
Expected invocation on the mock once, but was 2 times: mock => mock.OnForceFlush(5000)

Performed invocations:

Mock<BaseProcessor:1> (mock):

  BaseProcessor<Activity>.SetParentProvider(TracerProviderSdk)
  BaseProcessor<Activity>.SetParentProvider(TracerProviderSdk)
  BaseProcessor<Activity>.OnStart(Activity)
  BaseProcessor<Activity>.OnEnd(Activity)
  BaseProcessor<Activity>.OnForceFlush(5000)
  BaseProcessor<Activity>.OnEnd(Activity)
  BaseProcessor<Activity>.OnForceFlush(5000)

Stack Trace:
at Moq.Mock.Verify(Mock mock, LambdaExpression expression, Times times, String failMessage) in C:\projects\moq4\src\Moq\Mock.cs:line 330
at Moq.Protected.ProtectedMock1.InternalVerify(String methodName, Type[] genericTypeArguments, Times times, Boolean exactParameterMatch, Object[] args) in C:\projects\moq4\src\Moq\Protected\ProtectedMock.cs:line 234 at Moq.Protected.ProtectedMock1.Verify(String methodName, Times times, Object[] args) in C:\projects\moq4\src\Moq\Protected\ProtectedMock.cs:line 206
at OpenTelemetry.Extensions.Tests.Trace.AutoFlushActivityProcessorTests.AutoFlushActivityProcessor_FlushAfterLocalServerSideRootSpans_EndMatchingSpan_Flush() in D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\test\OpenTelemetry.Extensions.Tests\Trace\AutoFlushActivityProcessorTests.cs:line 45
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

@cijothomas
Copy link
Member Author

Failed OpenTelemetry.Extensions.Tests.Trace.AutoFlushActivityProcessorTests.AutoFlushActivityProcessor_FlushAfterLocalServerSideRootSpans_EndMatchingSpan_Flush [120 ms]
Error Message:
Moq.MockException :
Expected invocation on the mock once, but was 2 times: mock => mock.OnForceFlush(5000)

Performed invocations:

Mock<BaseProcessor:1> (mock):

  BaseProcessor<Activity>.SetParentProvider(TracerProviderSdk)
  BaseProcessor<Activity>.SetParentProvider(TracerProviderSdk)
  BaseProcessor<Activity>.OnStart(Activity)
  BaseProcessor<Activity>.OnEnd(Activity)
  BaseProcessor<Activity>.OnForceFlush(5000)
  BaseProcessor<Activity>.OnEnd(Activity)
  BaseProcessor<Activity>.OnForceFlush(5000)

Stack Trace:
at Moq.Mock.Verify(Mock mock, LambdaExpression expression, Times times, String failMessage) in C:\projects\moq4\src\Moq\Mock.cs:line 330
at Moq.Protected.ProtectedMock1.InternalVerify(String methodName, Type[] genericTypeArguments, Times times, Boolean exactParameterMatch, Object[] args) in C:\projects\moq4\src\Moq\Protected\ProtectedMock.cs:line 234 at Moq.Protected.ProtectedMock1.Verify(String methodName, Times times, Object[] args) in C:\projects\moq4\src\Moq\Protected\ProtectedMock.cs:line 206
at OpenTelemetry.Extensions.Tests.Trace.AutoFlushActivityProcessorTests.AutoFlushActivityProcessor_FlushAfterLocalServerSideRootSpans_EndMatchingSpan_Flush() in D:\a\opentelemetry-dotnet-contrib\opentelemetry-dotnet-contrib\test\OpenTelemetry.Extensions.Tests\Trace\AutoFlushActivityProcessorTests.cs:line 45
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

@martinjt
Copy link
Member

martinjt commented Jun 2, 2024

Looks like this was merged and fixed.

@martinjt martinjt closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants