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

Akka.Streams.Tests.Dsl.RestartSpec.A_restart_with_backoff_flow_should_not_restart_on_completion_when_maxRestarts_is_reached: racy specs #7422

Open
Aaronontheweb opened this issue Dec 19, 2024 · 0 comments

Comments

@Aaronontheweb
Copy link
Member

One of the raciest tests in the suite currently

Assertion failure:

System.Exception : [ExpectNextN] expected 2 next elements but received 1 elements before an exception occured. Received: [out complete]
---- Failed: Timeout 00:00:03 while waiting for a message of type Akka.Streams.TestKit.TestSubscriber+OnNext`1[System.String] 

Stack trace

   at Akka.Streams.TestKit.TestSubscriber.ManualProbe`1.ExpectNextNTask(TestProbe probe, Int64 n, Nullable`1 timeout, CancellationToken cancellationToken)+MoveNext() in /home/vsts/work/1/s/src/core/Akka.Streams.TestKit/TestSubscriber_Shared.cs:line 214
   at Akka.Streams.TestKit.TestSubscriber.ManualProbe`1.ExpectNextNTask(TestProbe probe, Int64 n, Nullable`1 timeout, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
   at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
   at Akka.Streams.Tests.Dsl.RestartSpec.<A_restart_with_backoff_flow_should_not_restart_on_completion_when_maxRestarts_is_reached>b__40_0() in /home/vsts/work/1/s/src/core/Akka.Streams.Tests/Dsl/RestartSpec.cs:line 1025
   at Akka.Streams.TestKit.Utils.<>c__DisplayClass5_0.<<AssertAllStagesStoppedAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/src/core/Akka.Streams.TestKit/Utils.cs:line 59
--- End of stack trace from previous location ---
   at Akka.TestKit.Extensions.TaskExtensions.<>c__DisplayClass5_0`1.<<ShouldCompleteWithin>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at FluentAssertions.Specialized.GenericAsyncFunctionAssertions`1.CompleteWithinAsync(TimeSpan timeSpan, String because, Object[] becauseArgs)
   at Akka.TestKit.Extensions.TaskExtensions.ShouldCompleteWithin[T](Task`1 task, TimeSpan timeout, String because, Object[] becauseArgs)
   at Akka.Streams.TestKit.Utils.AssertAllStagesStoppedAsync[T](TestKitBase spec, Func`1 block, IMaterializer materializer, Nullable`1 timeout, CancellationToken cancellationToken)
   at Akka.Streams.TestKit.Utils.AssertAllStagesStoppedAsync(TestKitBase spec, Func`1 block, IMaterializer materializer, Nullable`1 timeout, CancellationToken cancellationToken) in /home/vsts/work/1/s/src/core/Akka.Streams.TestKit/Utils.cs:line 57
   at Akka.Streams.Tests.Dsl.RestartSpec.A_restart_with_backoff_flow_should_not_restart_on_completion_when_maxRestarts_is_reached() in /home/vsts/work/1/s/src/core/Akka.Streams.Tests/Dsl/RestartSpec.cs:line 1016
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
   at Akka.TestKit.Xunit2.XunitAssertions.Fail(String format, Object[] args) in /home/vsts/work/1/s/src/contrib/testkits/Akka.TestKit.Xunit2/XunitAssertions.cs:line 26
   at Akka.TestKit.TestKitBase.InternalExpectMsgEnvelopeAsync[T](Nullable`1 timeout, Action`2 assert, String hint, CancellationToken cancellationToken, Boolean shouldLog) in /home/vsts/work/1/s/src/core/Akka.TestKit/TestKitBase_Expect.cs:line 436
   at Akka.TestKit.TestKitBase.InternalExpectMsgEnvelopeAsync[T](Nullable`1 timeout, Action`1 msgAssert, Action`1 senderAssert, String hint, CancellationToken cancellationToken) in /home/vsts/work/1/s/src/core/Akka.TestKit/TestKitBase_Expect.cs:line 411
   at Akka.TestKit.TestKitBase.InternalExpectMsgAsync[T](Nullable`1 timeout, Action`1 msgAssert, Action`1 senderAssert, String hint, CancellationToken cancellationToken) in /home/vsts/work/1/s/src/core/Akka.TestKit/TestKitBase_Expect.cs:line 379
   at Akka.Streams.TestKit.TestSubscriber.ManualProbe`1.ExpectNextNTask(TestProbe probe, Int64 n, Nullable`1 timeout, CancellationToken cancellationToken)+MoveNext()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant