roycornelissen / NServiceBus.AcceptanceTesting.Sample

Sample implementation of an acceptance test scenario with NServiceBus.AcceptanceTesting.
Other
2 stars 1 forks source link

RabbitMQ transport #1

Open peuramaki opened 8 years ago

peuramaki commented 8 years ago

Hi Roy,

long time no see. Thanks for bringing light into acceptance testing with NSB.

However, I'm using RabbitMQ as transport, and am unable to build end-to-end tests; the tests just freeze (and eventually time out) if I have more than one endpoint in the test case. Strangely enough, using just one endpoint works perfectly.

Steps to repro: switch to RabbitMQ transport.

Do you have any idea what could be wrong?

roycornelissen commented 8 years ago

Hi! Thanks for the feedback! Nice to hear from you again, hope all's been well since we took the ADSD course :)

I don't have much experience with the RabbitMQ transport. From the symptoms it looks like a weird threading issue in the transport or something. Maybe it's sharing state that it shouldn't or some kind of lock in there...?

It raises the question if running these tests on the actual transport is something you should or should not do. If you regard them as "extended unit tests" then maybe you would prefer mocking the transport with an in memory or other implementation. On the other hand, since the transport could matter a great deal in how your system behaves you'd actually want to test it with the physical transport.

Sorry I don't have a clear cut answer right now, I'd have to investigate myself too.

peuramaki commented 8 years ago

Hi, all is well indeed, thanks for asking. Hope things are working out for you too.

Yep, sounds like a threading issue to me as well. And I do want to run things using physical transport and physical persistence, since I'm working on actual acceptance tests.

There have been threading issues in RabbitMQ transport before, maybe I'll take a look at some point.