use of alluxio.conf.ConfigurationBuilder in project alluxio by Alluxio.
the class PollingMasterInquireClientTest method pollRejectingDoesntHang.
@Test(timeout = 10000)
public void pollRejectingDoesntHang() throws Exception {
int port = mPort.getPort();
InetSocketAddress serverAddress = new InetSocketAddress("127.0.0.1", port);
RejectingServer s = new RejectingServer(serverAddress);
s.start();
List<InetSocketAddress> addrs = Arrays.asList(InetSocketAddress.createUnresolved(NetworkAddressUtils.getLocalHostName(Constants.SECOND_MS), port));
PollingMasterInquireClient client = new PollingMasterInquireClient(addrs, () -> new CountingRetry(0), new ConfigurationBuilder().build());
try {
client.getPrimaryRpcAddress();
fail("Expected polling to fail");
} catch (UnavailableException e) {
// Expected
}
}
Aggregations