|
||||||||||
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.unit.close.JavaServerCloseRaceConditionTest
public class JavaServerCloseRaceConditionTest
QPID-1809 Race condition on error handling and close logic. See most often with SimpleACLTest as this test is the expects the server to shut the connection/channels. This sort of testing is not performed by many, if any, of the other system tests. The problem is that we have two threads MainThread Exception(Mina)Thread | | Performs | ACtion | | Receives Server | Close Blocks for | Response | | Starts To Notify | client | | | <----- Notify Main Thread Notification | wakes client | | | Client then | processes Error. | | | Potentially Attempting Close Channel/Connection Connection Close The two threads both attempt to close the connection but the main thread does so assuming that the connection is open and valid. The Exception thread must modify the connection so that no furter syncWait commands are performed. This test sends an ExchangeDeclare that is Asynchronous and will fail and so cause a ChannelClose error but we perform a syncWait so that we can be sure to test that the BlockingWaiter is correctly awoken.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
---|
QpidBrokerTestCase.MessageType |
Field Summary |
---|
Fields inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
---|
_broker, _brokerLanguage, _brokerLogPrefix, _brokerOutputStream, _brokerPersistent, _brokers, _configFile, _connectionFactory, _connections, _initialContext, _interleaveBrokerLog, _logger, _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 | |
---|---|
JavaServerCloseRaceConditionTest()
|
Method Summary | |
---|---|
void |
test()
|
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 |
Constructor Detail |
---|
public JavaServerCloseRaceConditionTest()
Method Detail |
---|
public void test() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |