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 31
31
* * cleanup: true - defined queues will be purged before running every test.
32
32
* * queues: [mail, twitter] - queues to cleanup
33
33
* * single_channel - create and use only one channel during test execution
34
+ * * reconnect - reconnects before each test to drop unused open channels
34
35
*
35
36
* ### Example
36
37
*
44
45
* vhost: '/'
45
46
* queues: [queue1, queue2]
46
47
* single_channel: false
48
+ * reconnect: false
47
49
*
48
50
* ## Public Properties
49
51
*
@@ -59,6 +61,7 @@ class AMQP extends Module implements RequiresPackage
59
61
'vhost ' => '/ ' ,
60
62
'cleanup ' => true ,
61
63
'single_channel ' => false ,
64
+ 'reconnect ' => false ,
62
65
'queues ' => []
63
66
];
64
67
@@ -96,6 +99,10 @@ public function _before(TestInterface $test): void
96
99
if ($ this ->config ['cleanup ' ]) {
97
100
$ this ->cleanup ();
98
101
}
102
+
103
+ if ($ this ->config ['reconnect ' ]) {
104
+ $ this ->getChannel ()->getConnection ()->reconnect ();
105
+ }
99
106
}
100
107
101
108
/**
You can’t perform that action at this time.
0 commit comments