diff options
| author | Alan Conway <aconway@apache.org> | 2013-09-03 16:07:29 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2013-09-03 16:07:29 +0000 |
| commit | 02cc596734dc9a8b775b553bc1ee8fff109316c7 (patch) | |
| tree | 72f165a95956664e8604c6fd73ec1fc0b336d105 /qpid/cpp/src | |
| parent | 7ee553fc7fd90d55b672507fdfccadbb6d2a76c2 (diff) | |
| download | qpid-python-02cc596734dc9a8b775b553bc1ee8fff109316c7.tar.gz | |
NO-JIRA: Remove obsolete qpid-cluster and qpid-cluster-store tools.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1519739 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rwxr-xr-x | qpid/cpp/src/tests/qpid-cluster-lag.py | 93 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/test_env.ps1.in | 1 |
2 files changed, 0 insertions, 94 deletions
diff --git a/qpid/cpp/src/tests/qpid-cluster-lag.py b/qpid/cpp/src/tests/qpid-cluster-lag.py deleted file mode 100755 index 5b24353241..0000000000 --- a/qpid/cpp/src/tests/qpid-cluster-lag.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -"""%prog [options] broker... -Check for brokers that lag behind other brokers in a cluster.""" - -import os, os.path, sys, socket, time, re -from qpid.messaging import * -from optparse import OptionParser -from threading import Thread - -class Browser(Thread): - def __init__(self, broker, queue, timeout): - Thread.__init__(self) - self.broker = broker - self.queue = queue - self.timeout = timeout - self.error = None - self.time = None - - def run(self): - try: - self.connection = Connection(self.broker) - self.connection.open() - self.session = self.connection.session() - self.receiver = self.session.receiver("%s;{mode:browse}"%self.queue) - self.msg = self.receiver.fetch(timeout=self.timeout) - self.time = time.time() - if (self.msg.content != self.queue): - raise Exception("Wrong message content, expected '%s' found '%s'"% - (self.queue, self.msg.content)) - except Empty: - self.error = "No message on queue %s"%self.queue - except Exception, e: - self.error = "Error: %s"%e - -def main(argv): - op = OptionParser(usage=__doc__) - op.add_option("--timeout", type="float", default=None, metavar="TIMEOUT", - help="Give up after TIMEOUT milliseconds, default never timeout") - (opts, args) = op.parse_args(argv) - if (len(args) <= 1): op.error("No brokers were specified") - brokers = args[1:] - - # Put a message on a uniquely named queue. - queue = "%s:%s:%s"%(os.path.basename(args[0]), socket.gethostname(), os.getpid()) - connection = Connection(brokers[0]) - connection.open() - session = connection.session() - sender = session.sender( - "%s;{create:always,delete:always,node:{durable:False}}"%queue) - sender.send(Message(content=queue)) - start = time.time() - # Browse for the message on each broker - if opts.timeout: opts.timeout - threads = [Browser(b, queue, opts.timeout) for b in brokers] - for t in threads: t.start() - delays=[] - - for t in threads: - t.join() - if t.error: - delay=t.error - else: - delay = t.time-start - delays.append([delay, t.broker]) - print "%s: %s"%(t.broker,delay) - if delays: - delays.sort() - print "lag: %s (%s-%s)"%(delays[-1][0] - delays[0][0], delays[-1][1], delays[0][1]) - # Clean up - sender.close() - session.close() - connection.close() - -if __name__ == "__main__": sys.exit(main(sys.argv)) diff --git a/qpid/cpp/src/tests/test_env.ps1.in b/qpid/cpp/src/tests/test_env.ps1.in index 5fa3a0ac31..12373b5b35 100644 --- a/qpid/cpp/src/tests/test_env.ps1.in +++ b/qpid/cpp/src/tests/test_env.ps1.in @@ -41,7 +41,6 @@ $PYTHON_COMMANDS="$QPID_TOOLS\src\py" $env:PYTHONPATH="$srcdir;$PYTHON_DIR;$PYTHON_COMMANDS;$QPID_TESTS_PY;$QPID_TOOLS_LIBS;$QMF_LIB;$env:PYTHONPATH" $QPID_CONFIG_EXEC="$PYTHON_COMMANDS\qpid-config" $QPID_ROUTE_EXEC="$PYTHON_COMMANDS\qpid-route" -$QPID_CLUSTER_EXEC="$PYTHON_COMMANDS\qpid-cluster" $QPID_HA_TOOL_EXEC="$PYTHON_COMMANDS\qpid-ha-tool" # Executables |
