diff options
| author | Alan Conway <aconway@apache.org> | 2010-03-08 17:34:09 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-03-08 17:34:09 +0000 |
| commit | 5202caa81535cb17b17fa66f05d851002ce850d7 (patch) | |
| tree | 723919b0e242f1f44fd61e6ca3355a8e0512a74a /qpid/cpp/src/tests | |
| parent | 9e11e1cd1a0516df8c63de07870e299e9a103a4b (diff) | |
| download | qpid-python-5202caa81535cb17b17fa66f05d851002ce850d7.tar.gz | |
QPID-2436: Fix cluster update of remote agents.
The v2key of cluster agents was not being passed as part of a cluster update.
This meant they were not being associated with the correct shadow connections on
the updatee. This caused inconsistencies that shut down the new broker.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@920414 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rw-r--r-- | qpid/cpp/src/tests/cluster_tests.fail | 2 | ||||
| -rwxr-xr-x | qpid/cpp/src/tests/cluster_tests.py | 24 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/test_env.sh.in | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/testagent/Makefile.am | 5 |
4 files changed, 20 insertions, 13 deletions
diff --git a/qpid/cpp/src/tests/cluster_tests.fail b/qpid/cpp/src/tests/cluster_tests.fail index 268795642d..b28b04f643 100644 --- a/qpid/cpp/src/tests/cluster_tests.fail +++ b/qpid/cpp/src/tests/cluster_tests.fail @@ -1,3 +1,3 @@ -cluster_tests.LongTests.test_management + diff --git a/qpid/cpp/src/tests/cluster_tests.py b/qpid/cpp/src/tests/cluster_tests.py index 276ad1af2d..08f1697c7a 100755 --- a/qpid/cpp/src/tests/cluster_tests.py +++ b/qpid/cpp/src/tests/cluster_tests.py @@ -144,7 +144,7 @@ class LongTests(BrokerTest): i += 1 b = cluster.start(expect=EXPECT_EXIT_FAIL) ErrorGenerator(b) - time.sleep(1) + time.sleep(min(5,self.duration()/2)) sender.stop() receiver.stop(sender.sent) for i in range(i, len(cluster)): cluster[i].kill() @@ -152,7 +152,7 @@ class LongTests(BrokerTest): def test_management(self): """Run management clients and other clients concurrently.""" - # FIXME aconway 2010-03-03: move to framework + # TODO aconway 2010-03-03: move to brokertest framework class ClientLoop(StoppableThread): """Run a client executable in a loop.""" def __init__(self, broker, cmd): @@ -173,14 +173,21 @@ class LongTests(BrokerTest): self.cmd, expect=EXPECT_UNKNOWN) finally: self.lock.release() try: exit = self.process.wait() - except: exit = 1 + except OSError, e: + # Seems to be a race in wait(), it throws + # "no such process" during test shutdown. + # Doesn't indicate a test error, ignore. + return + except Exception, e: + self.process.unexpected( + "client of %s: %s"%(self.broker.name, e)) self.lock.acquire() try: # Quit and ignore errors if stopped or expecting failure. if self.stopped: break if exit != 0: - self.process.unexpected("client of %s exit status %s" % - (self.broker.name, exit)) + self.process.unexpected( + "client of %s exit code %s"%(self.broker.name, exit)) finally: self.lock.release() except Exception, e: self.error = RethrownException("Error in ClientLoop.run") @@ -218,9 +225,7 @@ class LongTests(BrokerTest): ["perftest", "--count", 1000, "--base-name", str(qpid.datatypes.uuid4()), "--port", broker.port()], ["qpid-queue-stats", "-a", "localhost:%s" %(broker.port())], - [os.path.join(self.rootdir, "testagent/testagent"), "localhost", - str(broker.port())] - ]: + ["testagent", "localhost", str(broker.port())] ]: batch.append(ClientLoop(broker, cmd)) clients.append(batch) @@ -238,7 +243,7 @@ class LongTests(BrokerTest): start_mclients(b) while time.time() < endtime: - time.sleep(min(5,self.duration())) + time.sleep(min(5,self.duration()/2)) for b in cluster[alive:]: b.ready() # Check if a broker crashed. # Kill the first broker. Ignore errors on its clients and all the mclients for c in clients[alive] + mclients: c.expect_fail() @@ -252,7 +257,6 @@ class LongTests(BrokerTest): b = cluster.start() start_clients(b) for b in cluster[alive:]: start_mclients(b) - for c in chain(mclients, *clients): c.stop() diff --git a/qpid/cpp/src/tests/test_env.sh.in b/qpid/cpp/src/tests/test_env.sh.in index 07bd4b2bee..db92c636d3 100644 --- a/qpid/cpp/src/tests/test_env.sh.in +++ b/qpid/cpp/src/tests/test_env.sh.in @@ -54,7 +54,7 @@ export RECEIVER_EXEC=$QPID_TEST_EXEC_DIR/receiver export SENDER_EXEC=$QPID_TEST_EXEC_DIR/sender # Path -export PATH=$top_builddir/src:$builddir:$srcdir:$PYTHON_COMMANDS:$QPID_TEST_EXEC_DIR:$PATH +export PATH=$top_builddir/src:$builddir:$builddir/testagent:$srcdir:$PYTHON_COMMANDS:$QPID_TEST_EXEC_DIR:$PATH # Modules export TEST_STORE_LIB=$testmoduledir/test_store.so diff --git a/qpid/cpp/src/tests/testagent/Makefile.am b/qpid/cpp/src/tests/testagent/Makefile.am index 5ca1a383e8..160d8adb57 100644 --- a/qpid/cpp/src/tests/testagent/Makefile.am +++ b/qpid/cpp/src/tests/testagent/Makefile.am @@ -43,7 +43,10 @@ CLEANFILES=$(GEN_SRC) gen.timestamp INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -Igen -noinst_PROGRAMS=testagent +qpidexecdir = $(libexecdir)/qpid +qpidtestdir = $(qpidexecdir)/tests + +qpidtest_PROGRAMS=testagent testagent_SOURCES=testagent.cpp $(GEN_SRC) testagent_LDADD=$(top_builddir)/src/libqmf.la |
