From 372976bc6de5a176f16069ed552b4c2fec9ee8fc Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 18 Apr 2012 14:59:31 +0000 Subject: QPID-3352: Fix test for failed session to avoid confusion with as yet uninitialised session Previously, Link was using sessionHandler::isReady() to determine if a bridge had failed and needed recovery. However this incorrectcly recovers bridges that are not yet initialized as well as those that have failed. This was causing sporadic core dumps in serveral of the ha_tests.py tests, in particular test_backup_acquired. This patch adds a callback to notify the bridge when the session is detached, and use this as the criteria for recovering a bridge. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1327532 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/run_federation_tests | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'qpid/cpp/src/tests') diff --git a/qpid/cpp/src/tests/run_federation_tests b/qpid/cpp/src/tests/run_federation_tests index b71fa14c47..7735b559cf 100755 --- a/qpid/cpp/src/tests/run_federation_tests +++ b/qpid/cpp/src/tests/run_federation_tests @@ -33,16 +33,13 @@ else SKIPTESTS='-i *_xml' # note: single quotes prevent expansion of * fi +QPIDD_CMD="../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no --log-enable=info+ --log-enable=debug+:Bridge --log-to-file" start_brokers() { - ../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no > qpidd.port - LOCAL_PORT=`cat qpidd.port` - ../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no > qpidd.port - REMOTE_PORT=`cat qpidd.port` - - ../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no > qpidd.port - REMOTE_B1=`cat qpidd.port` - ../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no > qpidd.port - REMOTE_B2=`cat qpidd.port` + rm -f fed_local.log fed_remote.log fed_b1.log fed_b2.log + LOCAL_PORT=$($QPIDD_CMD fed_local.log) + REMOTE_PORT=$($QPIDD_CMD fed_remote.log) + REMOTE_B1=$($QPIDD_CMD fed_b1.log) + REMOTE_B2=$($QPIDD_CMD fed_b2.log) } stop_brokers() { -- cgit v1.2.1