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

RabbitMQ IntegrationTests are flaky #775

Closed
rngcntr opened this issue Mar 9, 2023 · 1 comment
Closed

RabbitMQ IntegrationTests are flaky #775

rngcntr opened this issue Mar 9, 2023 · 1 comment

Comments

@rngcntr
Copy link
Collaborator

rngcntr commented Mar 9, 2023

The RabbitMQ integration tests regularly fail with stack traces like this one:

[xUnit.net 00:00:46.56]     Motor.Extensions.Hosting.RabbitMQ_IntegrationTest.RabbitMQTests.ConsumerStartAsync_CheckParallelProcessing_EnsureAllMessagesAreConsumed [FAIL]
  Failed Motor.Extensions.Hosting.RabbitMQ_IntegrationTest.RabbitMQTests.ConsumerStartAsync_CheckParallelProcessing_EnsureAllMessagesAreConsumed [12 s]
  Error Message:
   RabbitMQ.Client.Exceptions.BrokerUnreachableException : None of the specified endpoints were reachable
---- RabbitMQ.Client.Exceptions.OperationInterruptedException : The AMQP operation was interrupted: AMQP close-reason, initiated by Library, code=0, text='End of stream', classId=0, methodId=0, cause=System.IO.EndOfStreamException: Reached the end of the stream. Possible authentication failure.
   at RabbitMQ.Client.Impl.InboundFrame.ReadFrom(Stream reader, Byte[] frameHeaderBuffer, ArrayPool`1 pool, UInt32 maxMessageSize)
   at RabbitMQ.Client.Framing.Impl.Connection.MainLoopIteration()
   at RabbitMQ.Client.Framing.Impl.Connection.MainLoop()
  Stack Trace:
     at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
   at RabbitMQ.Client.ConnectionFactory.CreateConnection(String clientProvidedName)
   at RabbitMQ.Client.ConnectionFactory.CreateConnection()
   at Motor.Extensions.Hosting.RabbitMQ_IntegrationTest.RabbitMQFixture.CreateConnection() in /home/runner/work/motornet/motornet/test/Motor.Extensions.Hosting.RabbitMQ_IntegrationTest/RabbitMQFixture.cs:line 59
   at Motor.Extensions.Hosting.RabbitMQ_IntegrationTest.RabbitMQFixture.get_Connection() in /home/runner/work/motornet/motornet/test/Motor.Extensions.Hosting.RabbitMQ_IntegrationTest/RabbitMQFixture.cs:line 30
   at Motor.Extensions.Hosting.RabbitMQ_IntegrationTest.RabbitMQTestBuilder.GetConsumer[T](IHostApplicationLifetime applicationLifetime) in /home/runner/work/motornet/motornet/test/Motor.Extensions.Hosting.RabbitMQ_IntegrationTest/RabbitMQTestBuilder.cs:line 231
   at Motor.Extensions.Hosting.RabbitMQ_IntegrationTest.RabbitMQTests.ConsumerStartAsync_CheckParallelProcessing_EnsureAllMessagesAreConsumed() in /home/runner/work/motornet/motornet/test/Motor.Extensions.Hosting.RabbitMQ_IntegrationTest/RabbitMQTests.cs:line 197
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
   at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply(TimeSpan timeout)
   at RabbitMQ.Client.Impl.ModelBase.ConnectionOpen(String virtualHost, String capabilities, Boolean insist)
   at RabbitMQ.Client.Framing.Impl.Connection.Open(Boolean insist)
   at RabbitMQ.Client.Framing.Impl.Connection..ctor(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler, String clientProvidedName)
   at RabbitMQ.Client.Framing.Impl.Connection..ctor(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler, ArrayPool`1 memoryPool, String clientProvidedName)
   at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IFrameHandler fh)
   at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IEndpointResolver endpoints)
   at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)

I suspect that the issue is a not-yet-healthy RabbitMQ container.

@rngcntr
Copy link
Collaborator Author

rngcntr commented Mar 13, 2023

Solved by #776

@rngcntr rngcntr closed this as completed Mar 13, 2023
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

1 participant