public class ClientImplTest extends Object
ClientImpl
class.Modifier and Type | Field and Description |
---|---|
protected MongoClientConfiguration |
myConfig
The active configuration.
|
protected ClientImpl |
myTestInstance
The instance under test.
|
Constructor and Description |
---|
ClientImplTest() |
protected MongoClientConfiguration myConfig
protected ClientImpl myTestInstance
public static void setUpBeforeClass() throws IOException
IOException
- On a failure to start the Mock MongoDB server.public static void tearDownAfterClass() throws IOException
IOException
- On a failure to stop the Mock MongoDB server.public void setUp()
public void tearDown()
public void testClose() throws IOException
ClientImpl.close()
.IOException
- on a test failure.public void testCloseFails() throws IOException
ClientImpl.close()
.IOException
- on aa test failure.public void testCloseOnThrownIoException() throws IOException
ClientImpl.close()
.IOException
- on a test failure.public void testCloseThenThrows() throws IOException
ClientImpl.close()
then throws an exception in a
send.IOException
- on a test failure.public void testCreatesConnectionOnScannedPending() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testGetClusterType()
ClientImpl.getClusterType()
.public void testGetConfig()
ClientImpl.getConfig()
.public void testGetDefaultDurability()
ClientImpl.getDefaultDurability()
.public void testHandleConnectionClosedForUnknownConnection() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testInvalidPrpertyChange() throws IOException
IOException
- On a test failure.public void testReconnect()
public void testReconnectFails() throws IOException
IOException
- On a test failure.public void testReconnectOnShutdownConnection() throws IOException, InterruptedException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.InterruptedException
- On a failure to pause in the test.public void testReconnectThatFails() throws IOException, InterruptedException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.InterruptedException
- On a failure to pause in the test.public void testRestartDocumentAssignable() throws IOException
ClientImpl.restart(DocumentAssignable)
.IOException
- on a test failure.public void testRestartDocumentAssignableNonCursorDoc() throws IOException
ClientImpl.restart(DocumentAssignable)
.IOException
- on a test failure.public void testRestartStreamCallbackDocumentAssignable() throws IOException
ClientImpl.restart(StreamCallback, DocumentAssignable)
.IOException
- on a test failure.public void testRestartStreamCallbackDocumentAssignableNonCursorDoc() throws IOException
ClientImpl.restart(DocumentAssignable)
.IOException
- on a test failure.public void testSendGetMoreCallbackOfReply() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessage() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessageAndCreateConnectionFailes() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessageClosesFirstWhenMaxShrinks() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessageClosesFirstWhenMaxShrinksAndCloseFails() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessageCreatesSecondConnectionOnPending() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessageFailsWhenAllAreClosed() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessageGetLastErrorCallbackOfReply() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessagePicksIdleExisting() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessagePicksMostIdleWhenAllPending() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.public void testSendMessageWaitsForReconnect() throws IOException, InterruptedException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.InterruptedException
- On a failure to pause in the test.public void testSendMessageWaitsForReconnectTimesOut() throws IOException, InterruptedException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.InterruptedException
- On a failure to pause in the test.public void testSendQueryCallbackOfReply() throws IOException
AbstractClient.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback)
.IOException
- On a failure setting up the test.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.