QAmqpExchange redeclaration test: Re-open a closed channel.
If the server closes the channel on us, re-open it before removing the exchange.
This commit is contained in:
parent
2b707d53de
commit
cd655d3f1d
|
|
@ -129,6 +129,12 @@ void tst_QAMQPExchange::invalidRedeclaration()
|
|||
// this is for rabbitmq:
|
||||
QCOMPARE(redeclared->error(), QAMQP::PreconditionFailedError);
|
||||
|
||||
// Server has probably closed the channel on us, if so, re-open it.
|
||||
if (!exchange->isOpen()) {
|
||||
exchange->reopen();
|
||||
QVERIFY(waitForSignal(exchange, SIGNAL(opened())));
|
||||
}
|
||||
|
||||
// cleanup
|
||||
exchange->remove();
|
||||
QVERIFY(waitForSignal(exchange, SIGNAL(removed())));
|
||||
|
|
|
|||
Loading…
Reference in New Issue