File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 3131 * * cleanup: true - defined queues will be purged before running every test.
3232 * * queues: [mail, twitter] - queues to cleanup
3333 * * single_channel - create and use only one channel during test execution
34+ * * reconnect - reconnects before each test to drop unused open channels
3435 *
3536 * ### Example
3637 *
4445 * vhost: '/'
4546 * queues: [queue1, queue2]
4647 * single_channel: false
48+ * reconnect: false
4749 *
4850 * ## Public Properties
4951 *
@@ -59,6 +61,7 @@ class AMQP extends Module implements RequiresPackage
5961 'vhost ' => '/ ' ,
6062 'cleanup ' => true ,
6163 'single_channel ' => false ,
64+ 'reconnect ' => false ,
6265 'queues ' => []
6366 ];
6467
@@ -96,6 +99,10 @@ public function _before(TestInterface $test): void
9699 if ($ this ->config ['cleanup ' ]) {
97100 $ this ->cleanup ();
98101 }
102+
103+ if ($ this ->config ['reconnect ' ]) {
104+ $ this ->getChannel ()->getConnection ()->reconnect ();
105+ }
99106 }
100107
101108 /**
You can’t perform that action at this time.
0 commit comments