Search in sources :

Example 6 with SocketAndStreams

use of voldemort.client.protocol.admin.SocketAndStreams in project voldemort by voldemort.

the class SocketPoolTest method testClosingDeactivates.

@Test
public void testClosingDeactivates() throws Exception {
    SocketAndStreams sas1 = pool.checkout(dest1);
    sas1.getSocket().close();
    pool.checkin(dest1, sas1);
    SocketAndStreams sas2 = pool.checkout(dest1);
    assertTrue(sas1 != sas2);
}
Also used : SocketAndStreams(voldemort.client.protocol.admin.SocketAndStreams) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 SocketAndStreams (voldemort.client.protocol.admin.SocketAndStreams)6 SocketDestination (voldemort.store.socket.SocketDestination)2 ArrayList (java.util.ArrayList)1 RequestFormatType (voldemort.client.protocol.RequestFormatType)1 AbstractSocketService (voldemort.server.AbstractSocketService)1 ClientRequestHandlerFactory (voldemort.server.protocol.ClientRequestHandlerFactory)1 TestStats (voldemort.socketpool.AbstractSocketPoolTest.TestStats)1 ResourcePoolConfig (voldemort.utils.pool.ResourcePoolConfig)1