Fixed transport testcase so that it does not fail anymore. tcp transport was being stopped and then oneway was being called on it, and it was throwing an unexpected illegalstate exception witched to ioexception and all was better.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384001 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-07 20:33:02 +00:00
parent 05b81ba8be
commit ead505da98
2 changed files with 3 additions and 2 deletions

View File

@ -83,11 +83,11 @@ public abstract class TransportThreadSupport extends TransportSupport implements
protected abstract void doStop(ServiceStopper stopper) throws Exception;
protected void checkStarted(Command command) {
protected void checkStarted(Command command) throws IOException {
if (!isStarted()) {
// we might try to shut down the transport before it was ever started in some test cases
if (!(command instanceof ShutdownInfo)) {
throw new IllegalStateException("The transport " + this + " of type: " + getClass().getName() + " has not been started yet!");
throw new IOException("The transport " + this + " of type: " + getClass().getName() + " is not running.");
}
}
}

View File

@ -239,6 +239,7 @@ public class FailoverTransport implements CompositeTransport {
if (connectedTransport != null) {
connectedTransport.stop();
connectedTransport=null;
}
reconnectMutex.notifyAll();
}