zenstruck / messenger-test

Assertions and helpers for testing your symfony/messenger queues.
MIT License
218 stars 15 forks source link

1.6.0 breaks most of my tests #61

Closed gndk closed 1 year ago

gndk commented 1 year ago

First of all, sorry for the vague issue.

When updating to 1.6.0, most of my tests fail. Everything up to 1.7.1 does not fix it. I think it is most likely related to #55.

Unfortunately I don't have a very good description of what is happening. It seems that messages are simply not being delivered in tests that don't use the InteractsWithMessenger trait. So those tests fail at various random points.

I use test://?intercept=false&catch_exceptions=false configuration and the workaround for doctrine detached entities.

I started working on an reproducer repo, but so far have not been able to reproduce it in a fresh project. Will take another look in the next few days.

Do you have any ideas/pointers that could help me debug/reproduce this?

nikophil commented 1 year ago

Hello @gndk

could you please try this, in this order:

another idea: is your TestTransport in "intercept" mode?

nikophil commented 1 year ago

@gndk would you mind to try this version please? https://github.com/zenstruck/messenger-test/pull/62

gndk commented 1 year ago

Everything green, works perfectly with this fix! 👍 Thanks!