add test for invalid passive exchange declarations
Verify the behavior of signaling an error if a passive exchange is declared, but not found on the server.
This commit is contained in:
parent
cac9d94491
commit
8cc8d5e641
|
|
@ -25,6 +25,7 @@ private Q_SLOTS:
|
|||
void invalidImmediateRouting();
|
||||
void confirmsSupport();
|
||||
void confirmDontLoseMessages();
|
||||
void passiveDeclareNotFound();
|
||||
|
||||
private:
|
||||
QScopedPointer<QAmqpClient> client;
|
||||
|
|
@ -190,5 +191,13 @@ void tst_QAMQPExchange::confirmDontLoseMessages()
|
|||
QVERIFY(defaultExchange->waitForConfirms());
|
||||
}
|
||||
|
||||
void tst_QAMQPExchange::passiveDeclareNotFound()
|
||||
{
|
||||
QAmqpExchange *nonExistentExchange = client->createExchange("this-does-not-exist");
|
||||
nonExistentExchange->declare(QAmqpExchange::Direct, QAmqpExchange::Passive);
|
||||
QVERIFY(waitForSignal(nonExistentExchange, SIGNAL(error(QAMQP::Error))));
|
||||
QCOMPARE(nonExistentExchange->error(), QAMQP::NotFoundError);
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QAMQPExchange)
|
||||
#include "tst_qamqpexchange.moc"
|
||||
|
|
|
|||
Loading…
Reference in New Issue