Search in sources :

Example 11 with ShutdownInfo

use of org.apache.activemq.command.ShutdownInfo in project activemq-artemis by apache.

the class ShutdownInfoTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    ShutdownInfo info = (ShutdownInfo) object;
}
Also used : ShutdownInfo(org.apache.activemq.command.ShutdownInfo)

Example 12 with ShutdownInfo

use of org.apache.activemq.command.ShutdownInfo in project activemq-artemis by apache.

the class ShutdownInfoTest method createObject.

@Override
public Object createObject() throws Exception {
    ShutdownInfo info = new ShutdownInfo();
    populateObject(info);
    return info;
}
Also used : ShutdownInfo(org.apache.activemq.command.ShutdownInfo)

Example 13 with ShutdownInfo

use of org.apache.activemq.command.ShutdownInfo in project activemq-artemis by apache.

the class ShutdownInfoTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    ShutdownInfo info = (ShutdownInfo) object;
}
Also used : ShutdownInfo(org.apache.activemq.command.ShutdownInfo)

Example 14 with ShutdownInfo

use of org.apache.activemq.command.ShutdownInfo in project activemq-artemis by apache.

the class ShutdownInfoTest method createObject.

@Override
public Object createObject() throws Exception {
    ShutdownInfo info = new ShutdownInfo();
    populateObject(info);
    return info;
}
Also used : ShutdownInfo(org.apache.activemq.command.ShutdownInfo)

Example 15 with ShutdownInfo

use of org.apache.activemq.command.ShutdownInfo in project activemq-artemis by apache.

the class FailoverTransportTest method testCommandsIgnoredWhenOffline.

@Test(timeout = 30000)
public void testCommandsIgnoredWhenOffline() throws Exception {
    this.transport = createTransport();
    assertNotNull(failoverTransport);
    ConnectionStateTracker tracker = failoverTransport.getStateTracker();
    assertNotNull(tracker);
    ConnectionId id = new ConnectionId("1");
    ConnectionInfo connection = new ConnectionInfo(id);
    // Track a connection
    tracker.track(connection);
    try {
        this.transport.oneway(new RemoveInfo(new ConnectionId("1")));
    } catch (Exception e) {
        fail("Should not have failed to remove this known connection");
    }
    try {
        this.transport.oneway(new RemoveInfo(new ConnectionId("2")));
    } catch (Exception e) {
        fail("Should not have failed to remove this unknown connection");
    }
    this.transport.oneway(new MessageAck());
    this.transport.oneway(new ShutdownInfo());
}
Also used : ConnectionId(org.apache.activemq.command.ConnectionId) RemoveInfo(org.apache.activemq.command.RemoveInfo) MessageAck(org.apache.activemq.command.MessageAck) ConnectionStateTracker(org.apache.activemq.state.ConnectionStateTracker) ConnectionInfo(org.apache.activemq.command.ConnectionInfo) ShutdownInfo(org.apache.activemq.command.ShutdownInfo) IOException(java.io.IOException) Test(org.junit.Test)

Aggregations

ShutdownInfo (org.apache.activemq.command.ShutdownInfo)19 IOException (java.io.IOException)1 ConnectionId (org.apache.activemq.command.ConnectionId)1 ConnectionInfo (org.apache.activemq.command.ConnectionInfo)1 MessageAck (org.apache.activemq.command.MessageAck)1 RemoveInfo (org.apache.activemq.command.RemoveInfo)1 ConnectionStateTracker (org.apache.activemq.state.ConnectionStateTracker)1 Test (org.junit.Test)1