Skip to content

Instantly share code, notes, and snippets.

@alexlehm
Created April 28, 2016 19:09
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/e921fca3c368617be29cc7432b376927 to your computer and use it in GitHub Desktop.
Save alexlehm/e921fca3c368617be29cc7432b376927 to your computer and use it in GitHub Desktop.
DefaultHostsFileEntriesResolverTest.java
/**
* show issue https://github.com/netty/netty/issues/5182
* HostsFileParser tries to resolve hostnames as case-sensitive
*/
package cx.lehmann.vertx;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
import io.netty.resolver.DefaultHostsFileEntriesResolver;
/**
* @author <a href="http://oss.lehmann.cx/">Alexander Lehmann</a>
*
*/
public class DefaultHostsFileEntriesResolverTest {
@Test
public void testLocalhost() {
DefaultHostsFileEntriesResolver resolver = new DefaultHostsFileEntriesResolver();
assertNotNull("localhost doesn't resolve", resolver.address("localhost"));
assertNotNull("LOCALHOST doesn't resolve", resolver.address("LOCALHOST"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment