diff options
author | Kim van der Riet <kpvdr@apache.org> | 2008-09-18 17:29:01 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2008-09-18 17:29:01 +0000 |
commit | f77b6753079800bc30600904312db1108dbaafc5 (patch) | |
tree | 6cc415ee5e71863a01f3ea265d649a422dbd30d4 /qpid/cpp/src | |
parent | 7034ad3dc106fca67755d39a28039d6168699295 (diff) | |
download | qpid-python-f77b6753079800bc30600904312db1108dbaafc5.tar.gz |
Modified return codes for txtest: returns 1 if check fails; 2 if exception is thrown; 0 otherwise.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@696729 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r-- | qpid/cpp/src/tests/txtest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/txtest.cpp b/qpid/cpp/src/tests/txtest.cpp index f0e70e83e9..c285ff9fcc 100644 --- a/qpid/cpp/src/tests/txtest.cpp +++ b/qpid/cpp/src/tests/txtest.cpp @@ -227,7 +227,7 @@ struct Controller : public Client } } - void check() + int check() { SubscriptionManager subs(session); subs.setFlowControl(SubscriptionManager::UNLIMITED, SubscriptionManager::UNLIMITED, false); @@ -289,7 +289,8 @@ struct Controller : public Client set_difference(drained.begin(), drained.end(), ids.begin(), ids.end(), back_inserter(extra)); if (missing.empty() && extra.empty()) { - std::cout << "All expected messages were retrieved." << std::endl; + std::cout << "All expected messages were retrieved." << std::endl; + return 0; } else { if (!missing.empty()) { std::cout << "The following ids were missing:" << std::endl; @@ -303,6 +304,7 @@ struct Controller : public Client std::cout << " '" << *i << "'" << std::endl; } } + return 1; } } }; @@ -314,10 +316,10 @@ int main(int argc, char** argv) Controller controller; if (opts.init) controller.init(); if (opts.transfer) controller.transfer(); - if (opts.check) controller.check(); + if (opts.check) return controller.check(); return 0; } catch(const std::exception& e) { std::cout << e.what() << std::endl; } - return 1; + return 2; } |