From 54c7eeab3e42737c7261aa2ae085cf87e616ee1b Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 3 Aug 2019 20:25:05 +0900 Subject: qmc-example: fix assertion failure --- examples/qmc-example.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/qmc-example.cpp b/examples/qmc-example.cpp index 10ea9d35..f649ac3f 100644 --- a/examples/qmc-example.cpp +++ b/examples/qmc-example.cpp @@ -408,16 +408,14 @@ void QMCTest::setTopic() if (evt->transactionId() != fakeTxnId) return false; - if (evt.deliveryStatus() == EventStatus::SendingFailed) { - QMC_CHECK("Fake state event immunity test", true); + // If Synapse rejected the event, skip the immunity test. + if (evt.deliveryStatus() == EventStatus::SendingFailed) return true; - } + if (evt.deliveryStatus() != EventStatus::ReachedServer) return false; // All before was just a preparation, this is where the test starts. - // (If Synapse rejected the event the library immunity can't be - // tested.) static const char* const fakeStateTestName = "Fake state event immunity test"; running.push_back(fakeStateTestName); -- cgit v1.2.3