Skip to content

Commit

Permalink
tests/qampqpexchange: skip test if rabbitmq does not support reject p…
Browse files Browse the repository at this point in the history
…ublish

References: jira PAM-5269
  • Loading branch information
manner82 committed May 25, 2018
1 parent dd0aed0 commit a06fd67
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/auto/qamqpexchange/tst_qamqpexchange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ void tst_QAMQPExchange::testRejectedMessagePublish()

QVERIFY(exchange->waitForConfirms());

if (deliveryConfirmedSpy.count() == 2)
{
SKIP("The AMQP server does not support x-overflow: reject-publish. For rabbitmq, it requires version >=3.7 (Skipped test)");
}

QCOMPARE(deliveryConfirmedSpy.count(), 1);
QCOMPARE(deliveryConfirmedSpy.first().first().toLongLong(), firstDeliveryTag);

Expand Down
6 changes: 6 additions & 0 deletions tests/common/qamqptestcase.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

#include "qamqpqueue.h"

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#define SKIP(x) QSKIP(x)
#else
#define SKIP(x) QSKIP(x, SkipAll)
#endif

class TestCase : public QObject
{
public:
Expand Down

0 comments on commit a06fd67

Please sign in to comment.