summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2011-01-20 14:13:08 +0000
committerAlan Conway <aconway@apache.org>2011-01-20 14:13:08 +0000
commit888f2f8b812308c32594f8abcca7aefc956b5803 (patch)
tree67ac8a15014e7c6b31f2ea3b5b64e354d7eb5614 /qpid/cpp/src/tests
parentedc8085edae3d1664ab82d736542f5643a7ea7ad (diff)
downloadqpid-python-888f2f8b812308c32594f8abcca7aefc956b5803.tar.gz
Bug 654872, QPID-3007: Batch management messages by count, not size.
QMF V1 management messages were being batched by accumulating up to a certain total size of data. Since management messages may have different sizes on brokers in a cluster, this was leading to inconsistencies. This patch batches V1 messages by count rather than by size, similar to V2 messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1061308 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rwxr-xr-xqpid/cpp/src/tests/cluster_test_logs.py7
-rwxr-xr-xqpid/cpp/src/tests/cluster_tests.py13
2 files changed, 15 insertions, 5 deletions
diff --git a/qpid/cpp/src/tests/cluster_test_logs.py b/qpid/cpp/src/tests/cluster_test_logs.py
index 0333822824..4cb921932e 100755
--- a/qpid/cpp/src/tests/cluster_test_logs.py
+++ b/qpid/cpp/src/tests/cluster_test_logs.py
@@ -59,7 +59,8 @@ def filter_log(log):
'task late',
'task overran',
'warning CLOSING .* unsent data',
- 'Inter-broker link '
+ 'Inter-broker link ',
+ 'Running in a cluster, marking store'
])
if re.compile(skip).search(l): continue
@@ -85,7 +86,7 @@ def filter_log(log):
out.write(l)
out.close()
-def verify_logs(logs):
+def verify_logs():
"""Compare log files from cluster brokers, verify that they correspond correctly."""
# FIXME aconway 2011-01-19: disable when called from unit tests
# Causing sporadic failures, see https://issues.apache.org/jira/browse/QPID-3007
@@ -110,4 +111,4 @@ def verify_logs(logs):
# Can be run as a script.
if __name__ == "__main__":
- verify_logs(glob.glob("*.log"))
+ verify_logs()
diff --git a/qpid/cpp/src/tests/cluster_tests.py b/qpid/cpp/src/tests/cluster_tests.py
index 6e515cdbf1..27010c17f7 100755
--- a/qpid/cpp/src/tests/cluster_tests.py
+++ b/qpid/cpp/src/tests/cluster_tests.py
@@ -302,7 +302,7 @@ acl allow all all
scanner.join()
assert scanner.found
# Verify logs are consistent
- cluster_test_logs.verify_logs(glob.glob("*.log"))
+ cluster_test_logs.verify_logs()
class LongTests(BrokerTest):
"""Tests that can run for a long time if -DDURATION=<minutes> is set"""
@@ -448,11 +448,20 @@ class LongTests(BrokerTest):
c.stop()
# Verify that logs are consistent
- cluster_test_logs.verify_logs(glob.glob("*.log"))
+ cluster_test_logs.verify_logs()
def test_management_qmf2(self):
self.test_management(args=["--mgmt-qmf2=yes"])
+ def test_connect_consistent(self): # FIXME aconway 2011-01-18:
+ args=["--mgmt-pub-interval=1","--log-enable=trace+:management"]
+ cluster = self.cluster(2, args=args)
+ end = time.time() + self.duration()
+ while (time.time() < end): # Get a management interval
+ for i in xrange(1000): cluster[0].connect().close()
+ cluster_test_logs.verify_logs()
+
+
class StoreTests(BrokerTest):
"""
Cluster tests that can only be run if there is a store available.