Search in sources :

Example 1 with ClientTransportFactory

use of io.grpc.internal.ClientTransportFactory in project grpc-java by grpc.

the class AbstractClientTransportFactoryTest method multipleCallsToCloseShouldNotThrow.

@Test
public void multipleCallsToCloseShouldNotThrow() {
    ClientTransportFactory transportFactory = newClientTransportFactory();
    transportFactory.close();
    transportFactory.close();
    transportFactory.close();
}
Also used : ClientTransportFactory(io.grpc.internal.ClientTransportFactory) Test(org.junit.Test)

Example 2 with ClientTransportFactory

use of io.grpc.internal.ClientTransportFactory in project grpc-java by grpc.

the class AbstractClientTransportFactoryTest method newClientTransportAfterCloseShouldThrow.

@Test(expected = IllegalStateException.class)
public void newClientTransportAfterCloseShouldThrow() {
    ClientTransportFactory transportFactory = newClientTransportFactory();
    transportFactory.close();
    transportFactory.newClientTransport(new InetSocketAddress("localhost", 12345), "localhost:" + 12345, "agent");
}
Also used : ClientTransportFactory(io.grpc.internal.ClientTransportFactory) InetSocketAddress(java.net.InetSocketAddress) Test(org.junit.Test)

Aggregations

ClientTransportFactory (io.grpc.internal.ClientTransportFactory)2 Test (org.junit.Test)2 InetSocketAddress (java.net.InetSocketAddress)1