added auto test for issue #33
This commit is contained in:
parent
92384ce7cb
commit
9bd5610ac7
|
|
@ -36,6 +36,7 @@ private Q_SLOTS:
|
||||||
void invalidCancelBecauseInvalidConsumerTag();
|
void invalidCancelBecauseInvalidConsumerTag();
|
||||||
void getEmpty();
|
void getEmpty();
|
||||||
void get();
|
void get();
|
||||||
|
void verifyContentEncodingIssue33();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void declareQueueAndVerifyConsuming(Queue *queue);
|
void declareQueueAndVerifyConsuming(Queue *queue);
|
||||||
|
|
@ -382,5 +383,22 @@ void tst_QAMQPQueue::get()
|
||||||
QVERIFY(waitForSignal(queue, SIGNAL(removed())));
|
QVERIFY(waitForSignal(queue, SIGNAL(removed())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_QAMQPQueue::verifyContentEncodingIssue33()
|
||||||
|
{
|
||||||
|
Queue *queue = client->createQueue("test-issue-33");
|
||||||
|
declareQueueAndVerifyConsuming(queue);
|
||||||
|
|
||||||
|
Exchange *defaultExchange = client->createExchange();
|
||||||
|
MessageProperties properties;
|
||||||
|
properties.insert(Frame::Content::cpContentEncoding, "fakeContentEncoding");
|
||||||
|
defaultExchange->publish("some data", "test-issue-33", properties);
|
||||||
|
|
||||||
|
QVERIFY(waitForSignal(queue, SIGNAL(messageReceived())));
|
||||||
|
Message message = queue->dequeue();
|
||||||
|
QString contentType =
|
||||||
|
message.properties().value(Frame::Content::cpContentEncoding).toString();
|
||||||
|
QCOMPARE(contentType, QLatin1String("fakeContentEncoding"));
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_MAIN(tst_QAMQPQueue)
|
QTEST_MAIN(tst_QAMQPQueue)
|
||||||
#include "tst_qamqpqueue.moc"
|
#include "tst_qamqpqueue.moc"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue