A better solution was to send envelopes one by one from TestTransport::get() and directly remove them from self::$queue[$name] in the get() method. Somehow I think we're closer from the real mechanism since when a message is passed to the worker it's removed from the queue.
BTW if you remove the fix, the test process_x_recursive_when_intercept_disabled() creates an infinite loop. This behavior wasn't caught by the tests because other tests which uses unblock() do not dispatch messages "D" or "E" which are not only ones which are recursive.
closes #32
A better solution was to send envelopes one by one from
TestTransport::get()
and directly remove them fromself::$queue[$name]
in theget()
method. Somehow I think we're closer from the real mechanism since when a message is passed to the worker it's removed from the queue.BTW if you remove the fix, the test
process_x_recursive_when_intercept_disabled()
creates an infinite loop. This behavior wasn't caught by the tests because other tests which usesunblock()
do not dispatch messages "D" or "E" which are not only ones which are recursive.