fix intermittent failure - exceptions that result from broker stop need to be ignored as this test forces a restart

This commit is contained in:
gtully 2014-03-19 15:30:34 +00:00
parent bf8eb0e6ca
commit 89446c7af0
1 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.util.Vector; import java.util.Vector;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock;
@ -38,6 +39,7 @@ import org.apache.activemq.broker.BrokerFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.command.ActiveMQTopic;
import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
import org.apache.activemq.transport.InactivityIOException;
import org.apache.activemq.util.Wait; import org.apache.activemq.util.Wait;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
@ -251,6 +253,12 @@ public class DurableSubProcessMultiRestartTest {
unsubscribe(); unsubscribe();
} catch (JMSException maybe) {
if (maybe.getCause() instanceof IOException) {
// ok on broker shutdown;
} else {
exit(toString() + " failed with JMSException", maybe);
}
} catch (Throwable e) { } catch (Throwable e) {
exit(toString() + " failed.", e); exit(toString() + " failed.", e);
} }