Repository: kudu Updated Branches: refs/heads/master 9939a5136 -> 65aec714f
java: remove flaky TestServerInfo.testConstructorNotSlow This test was added in commit 0b1adf1f6. At the time there was some concern that the 500ms timeout could cause flakiness, but the reasoning was that the InetAddress.getByName calls weren't going to do DNS lookups. However, I saw the test timeout in precommit with the following stack trace: org.junit.runners.model.TestTimedOutException: test timed out after 500 milliseconds at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242) at java.io.File.exists(File.java:819) at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1245) at sun.misc.URLClassPath$FileLoader.findResource(URLClassPath.java:1212) at sun.misc.URLClassPath.findResource(URLClassPath.java:188) at java.net.URLClassLoader$2.run(URLClassLoader.java:569) at java.net.URLClassLoader$2.run(URLClassLoader.java:567) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(URLClassLoader.java:566) at java.lang.ClassLoader.getResource(ClassLoader.java:1096) at org.apache.log4j.helpers.Loader.getResource(Loader.java:110) at org.apache.log4j.LogManager.<clinit>(LogManager.java:107) at org.slf4j.impl.Log4jLoggerFactory.<init>(Log4jLoggerFactory.java:66) at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383) at org.apache.kudu.util.NetUtil.<clinit>(NetUtil.java:42) at org.apache.kudu.client.ServerInfo.<init>(ServerInfo.java:58) at org.apache.kudu.client.TestServerInfo.testConstructorNotSlow(TestServerInfo.java:35) Per the trace, it can take over 500ms just to initialize the test and its dependents. As such, I think it's flaky by design and should be removed. Change-Id: Id7bbe47bc88e88d67ebdb199cf34723a4b69e57c Reviewed-on: http://gerrit.cloudera.org:8080/11125 Reviewed-by: Andrew Wong <aw...@cloudera.com> Tested-by: Adar Dembo <a...@cloudera.com> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/65aec714 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/65aec714 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/65aec714 Branch: refs/heads/master Commit: 65aec714f68b83cde4730ab340f8a5a227bf7075 Parents: 9939a51 Author: Adar Dembo <a...@cloudera.com> Authored: Sat Aug 4 14:45:53 2018 -0700 Committer: Adar Dembo <a...@cloudera.com> Committed: Tue Aug 7 18:56:09 2018 +0000 ---------------------------------------------------------------------- .../java/org/apache/kudu/client/TestServerInfo.java | 14 -------------- 1 file changed, 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/65aec714/java/kudu-client/src/test/java/org/apache/kudu/client/TestServerInfo.java ---------------------------------------------------------------------- diff --git a/java/kudu-client/src/test/java/org/apache/kudu/client/TestServerInfo.java b/java/kudu-client/src/test/java/org/apache/kudu/client/TestServerInfo.java index 38df64d..9aea64f 100644 --- a/java/kudu-client/src/test/java/org/apache/kudu/client/TestServerInfo.java +++ b/java/kudu-client/src/test/java/org/apache/kudu/client/TestServerInfo.java @@ -23,20 +23,6 @@ import java.net.UnknownHostException; public class TestServerInfo { /** - * Test for KUDU-1982 Java client calls NetworkInterface.getByInetAddress too often. - */ - @Test(timeout = 500) - public void testConstructorNotSlow() throws Exception { - String uuid = "nevermind"; - HostAndPort hap = HostAndPort.fromString("nevermind:12345"); - // ip to force NetworkInterface.getByInetAddress call - InetAddress ia = InetAddress.getByName("8.8.8.8"); - for (int i = 0; i < 100; ++i) { - new ServerInfo(uuid, hap, ia); - } - } - - /** * Test for KUDU-2103. Checks if the original hostnames is returned if unknown. */ @Test