use of io.grpc.internal.JndiResourceResolverFactory.JndiRecordFetcher in project grpc-java by grpc.
the class JndiResourceResolverTest method jndiResolverWorks.
@IgnoreJRERequirement
@Test
public void jndiResolverWorks() throws Exception {
Assume.assumeNoException(new JndiResourceResolverFactory().unavailabilityCause());
RecordFetcher recordFetcher = new JndiRecordFetcher();
try {
recordFetcher.getAllRecords("SRV", "dns:///localhost");
} catch (javax.naming.CommunicationException e) {
Assume.assumeNoException(e);
} catch (javax.naming.NameNotFoundException e) {
Assume.assumeNoException(e);
}
}
Aggregations