summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/tests')
-rw-r--r--qpid/cpp/src/tests/assertions.py15
-rw-r--r--qpid/cpp/src/tests/txshift.cpp4
2 files changed, 17 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/assertions.py b/qpid/cpp/src/tests/assertions.py
index f1db21b753..930afd124d 100644
--- a/qpid/cpp/src/tests/assertions.py
+++ b/qpid/cpp/src/tests/assertions.py
@@ -177,3 +177,18 @@ class AssertionTests (VersionTest):
assert False, "Expected assertion to fail on unspecified option"
except AssertionFailed: None
except MessagingError: None
+
+ def test_queue_autodelete_timeout(self):
+ name = str(uuid4())
+ # create subscription queue with 0-10 to be sure of name
+ ssn_0_10 = self.create_connection("amqp0-10", True).session()
+ ssn_0_10.receiver("amq.direct; {link:{name:%s,timeout:30}}" % name)
+ self.ssn.sender("%s; {assert:always, node:{x-declare:{arguments: {qpid.auto_delete_timeout: 30}}}}" % name)
+ ssn_0_10_other = self.create_connection("amqp0-10", True).session()
+ ssn_0_10_other.sender("%s; {assert:always, node:{x-declare:{arguments: {qpid.auto_delete_timeout: 30}}}}" % name)
+ try:
+ self.ssn.sender("%s; {assert:always, node:{x-declare:{arguments: {qpid.auto_delete_timeout: 60}}}}" % name)
+ ssn_0_10_other.sender("%s; {assert:always, node:{x-declare:{arguments: {qpid.auto_delete_timeout: 60}}}}" % name)
+ assert False, "Expected assertion to fail for auto_delete_timeout"
+ except AssertionFailed: None
+ except MessagingError: None
diff --git a/qpid/cpp/src/tests/txshift.cpp b/qpid/cpp/src/tests/txshift.cpp
index bf85bee986..6ec28c7233 100644
--- a/qpid/cpp/src/tests/txshift.cpp
+++ b/qpid/cpp/src/tests/txshift.cpp
@@ -40,7 +40,7 @@ namespace tests {
struct Args : public qpid::TestOptions
{
std::string workQueue;
- size_t workers;
+ uint workers;
Args() : workQueue("txshift-control"), workers(1)
{
@@ -178,7 +178,7 @@ int main(int argc, char** argv)
worker.run();
} else {
boost::ptr_vector<Worker> workers;
- for (size_t i = 0; i < opts.workers; i++) {
+ for (uint i = 0; i < opts.workers; i++) {
workers.push_back(new Worker(connection, opts.workQueue));
}
std::for_each(workers.begin(), workers.end(), boost::bind(&Worker::start, _1));