|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.qpid.test.utils.QpidTestCase
org.apache.qpid.test.utils.QpidBrokerTestCase
org.apache.qpid.test.utils.FailoverBaseCase
org.apache.qpid.test.unit.ack.AcknowledgeTest
org.apache.qpid.test.unit.ack.AcknowledgeAfterFailoverTest
public class AcknowledgeAfterFailoverTest
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
---|
QpidBrokerTestCase.MessageType |
Field Summary | |
---|---|
protected CountDownLatch |
_failoverCompleted
|
Fields inherited from class org.apache.qpid.test.unit.ack.AcknowledgeTest |
---|
_connection, _consumer, _consumerSession, _producer, _queue, NUM_MESSAGES |
Fields inherited from class org.apache.qpid.test.utils.FailoverBaseCase |
---|
_logger, DEFAULT_FAILOVER_TIME, FAILING_PORT, FAILING_VM_PORT, failingPort |
Fields inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
---|
_broker, _brokerLanguage, _brokerLogPrefix, _brokerOutputStream, _brokerPersistent, _brokers, _configFile, _connectionFactory, _connections, _initialContext, _interleaveBrokerLog, _output, _outputFile, _testName, BROKER_READY, CONTENT, CPP, DEFAULT_MANAGEMENT_PORT, DEFAULT_MESSAGE_SIZE, DEFAULT_PORT, DEFAULT_SSL_PORT, DEFAULT_VM_PORT, EXTERNAL, INDEX, JAVA, LOGMONITOR_TIMEOUT, QPID_HOME, QpidHome, QUEUE, RECEIVE_TIMEOUT, TOPIC, VM |
Fields inherited from class org.apache.qpid.test.utils.QpidTestCase |
---|
MEMORY_STORE_CLASS_NAME, MS_CLASS_NAME_KEY |
Constructor Summary | |
---|---|
AcknowledgeAfterFailoverTest()
|
Method Summary | |
---|---|
void |
bytesReceived(long count)
|
void |
bytesSent(long count)
|
void |
doAcknowlegement(Message msg)
Perform the acknowledgement of messages if additionally required. |
void |
failBroker(int port)
Override so we can block until failover has completd |
void |
failoverComplete()
|
protected void |
init(boolean transacted,
int mode)
Override default init to add connectionListener so we can verify that failover took place |
boolean |
preFailover(boolean redirect)
|
protected void |
prepBroker(int index)
|
boolean |
preResubscribe()
|
void |
setUp()
|
protected void |
testDirtyAcking(boolean transacted,
int mode)
Test that Acking/Committing a message received before failover causes an exception at commit/ack time. |
void |
testDirtyAckingTransacted()
|
void |
testDirtyClientAck()
|
Methods inherited from class org.apache.qpid.test.unit.ack.AcknowledgeTest |
---|
testAcking, testAutoAck, testClientAck, testDupsOk, testNoAck, testPreAck, testTransacted |
Methods inherited from class org.apache.qpid.test.utils.FailoverBaseCase |
---|
getConnectionFactory, getFailingPort, tearDown |
Methods inherited from class org.apache.qpid.test.utils.QpidTestCase |
---|
getTestProfileMessageStoreClassName, run |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected CountDownLatch _failoverCompleted
Constructor Detail |
---|
public AcknowledgeAfterFailoverTest()
Method Detail |
---|
public void setUp() throws Exception
setUp
in class AcknowledgeTest
Exception
protected void init(boolean transacted, int mode) throws Exception
init
in class AcknowledgeTest
transacted
- create a transacted session for this testmode
- if not transacted what ack mode to use for this test
Exception
- if a problem occured during test setup.protected void prepBroker(int index) throws Exception
Exception
public void doAcknowlegement(Message msg) throws JMSException
AcknowledgeTest
doAcknowlegement
in class AcknowledgeTest
JMSException
protected void testDirtyAcking(boolean transacted, int mode) throws Exception
transacted
- is this session trasactedmode
- What ack mode should be used if not trasacted
Exception
- if something goes wrong.public void testDirtyClientAck() throws Exception
Exception
public void testDirtyAckingTransacted() throws Exception
Exception
public void bytesSent(long count)
bytesSent
in interface org.apache.qpid.jms.ConnectionListener
public void bytesReceived(long count)
bytesReceived
in interface org.apache.qpid.jms.ConnectionListener
public boolean preFailover(boolean redirect)
preFailover
in interface org.apache.qpid.jms.ConnectionListener
public boolean preResubscribe()
preResubscribe
in interface org.apache.qpid.jms.ConnectionListener
public void failoverComplete()
failoverComplete
in interface org.apache.qpid.jms.ConnectionListener
public void failBroker(int port)
failBroker
in class FailoverBaseCase
port
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |