From 769416f61343b6458529f023164b6ebb837eec3c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Sat, 11 Apr 2009 14:29:04 +0000 Subject: Fix issues when cluster is run with persistence enabled. - Handle partial failures (e.g. due to disk error): failing brokers shut down, others continue. - Enable persistence in cluster tests. - Correct message status in DeliveryRecord updates. - Remove qpid.update queue when update complete - avoid it becoming persistent git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@764204 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/failover_soak.cpp | 61 +---------------------------------------- 1 file changed, 1 insertion(+), 60 deletions(-) (limited to 'cpp/src/tests/failover_soak.cpp') diff --git a/cpp/src/tests/failover_soak.cpp b/cpp/src/tests/failover_soak.cpp index 18d693e5ec..2da60f47b5 100644 --- a/cpp/src/tests/failover_soak.cpp +++ b/cpp/src/tests/failover_soak.cpp @@ -220,63 +220,13 @@ struct children : public vector cout << "\n\n\n\n"; } - - /* - Only call this if you already know there is at least - one child still running. Supply a time in seconds. - If it has been at least that long since a shild stopped - running, we judge the system to have hung. - */ - int - hanging ( int hangTime ) - { - struct timeval now, - duration; - gettimeofday ( &now, 0 ); - - int how_many_hanging = 0; - - vector::iterator i; - for ( i = begin(); i != end(); ++ i ) - { - //Not in POSIX - //timersub ( & now, &((*i)->startTime), & duration ); - duration.tv_sec = now.tv_sec - (*i)->startTime.tv_sec; - duration.tv_usec = now.tv_usec - (*i)->startTime.tv_usec; - if (duration.tv_usec < 0) { - --duration.tv_sec; - duration.tv_usec += 1000000; - } - - if ( (COMPLETED != (*i)->status) // child isn't done running - && - ( duration.tv_sec >= hangTime ) // it's been too long - ) - { - std::cerr << "Child of type " - << (*i)->type - << " hanging. " - << "PID is " - << (*i)->pid - << endl; - ++ how_many_hanging; - } - } - - return how_many_hanging; - } - - int verbosity; }; - children allMyChildren; - - void childExit ( int ) { @@ -389,6 +339,7 @@ startNewBroker ( brokerVector & brokers, ("--log-prefix") (prefix.str()) ("--log-to-file") + ("--log-enable=error+") (prefix.str()+".log"); if (endsWith(moduleOrDir, "cluster.so")) { @@ -818,16 +769,6 @@ main ( int argc, char const ** argv ) return ERROR_ON_CHILD; } - // If one is hanging, quit. - if ( allMyChildren.hanging ( 120 ) ) - { - /* - * Don't kill any processes. Leave alive for questioning. - * */ - std::cerr << "END_OF_TEST ERROR_HANGING\n"; - return HANGING; - } - if ( verbosity > 1 ) { std::cerr << "------- next kill-broker loop --------\n"; allMyChildren.print(); -- cgit v1.2.1