Skip to content

Instantly share code, notes, and snippets.

@alexlehm
Created July 29, 2016 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexlehm/d4d4ffdf95c97c78dff7ba91de1b0d09 to your computer and use it in GitHub Desktop.
Save alexlehm/d4d4ffdf95c97c78dff7ba91de1b0d09 to your computer and use it in GitHub Desktop.
UnknownHostExceptionTest.java
import org.junit.Test;
import io.vertx.core.impl.VertxImpl;
import io.vertx.test.core.VertxTestBase;
/**
* @author <a href="http://oss.lehmann.cx/">Alexander Lehmann</a>
*
*/
public class UnknownHostExceptionTest extends VertxTestBase {
@Test
public void testResolveExceptionHostname() throws Exception {
((VertxImpl)vertx).resolveAddress("sdfsdfsdfsdsdffd", res -> {
if (res.succeeded()) {
System.out.println(res.result());
} else {
res.cause().printStackTrace();
testComplete();
}
});
await();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment