add auto test for unbinding from an exchange
This commit is contained in:
parent
bad40ac83b
commit
f11caabb14
|
|
@ -21,6 +21,7 @@ private Q_SLOTS:
|
||||||
|
|
||||||
void remove();
|
void remove();
|
||||||
void removeIfUnused();
|
void removeIfUnused();
|
||||||
|
void unbind();
|
||||||
|
|
||||||
private: // disabled
|
private: // disabled
|
||||||
void removeIfEmpty();
|
void removeIfEmpty();
|
||||||
|
|
@ -131,5 +132,19 @@ void tst_QAMQPQueue::removeIfEmpty()
|
||||||
QVERIFY(!queue->errorString().isEmpty());
|
QVERIFY(!queue->errorString().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_QAMQPQueue::unbind()
|
||||||
|
{
|
||||||
|
Queue *queue = client->createQueue("test-unbind");
|
||||||
|
queue->declare();
|
||||||
|
QVERIFY(waitForSignal(queue, SIGNAL(declared())));
|
||||||
|
queue->consume(); // required because AutoDelete will not delete if
|
||||||
|
// there was never a consumer
|
||||||
|
|
||||||
|
queue->bind("amq.topic", "routingKey");
|
||||||
|
QVERIFY(waitForSignal(queue, SIGNAL(bound())));
|
||||||
|
queue->unbind("amq.topic", "routingKey");
|
||||||
|
QVERIFY(waitForSignal(queue, SIGNAL(unbound())));
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_MAIN(tst_QAMQPQueue)
|
QTEST_MAIN(tst_QAMQPQueue)
|
||||||
#include "tst_qamqpqueue.moc"
|
#include "tst_qamqpqueue.moc"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue