Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12449

TestDNS and TestNetUtils failing if no network

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: test
    • Labels:
      None

      Description

      On a laptop with wifi enabled but unbonded, test cases in TestDNS and TestNetUtils fail due to DNS problems. They need to skip in this situation

        Activity

        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2429 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2429/)
        HADOOP-12449. TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2429 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2429/ ) HADOOP-12449 . TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #491 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/491/)
        HADOOP-12449. TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83)

        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #491 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/491/ ) HADOOP-12449 . TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #535 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/535/)
        HADOOP-12449. TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83)

        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #535 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/535/ ) HADOOP-12449 . TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #1259 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1259/)
        HADOOP-12449. TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83)

        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #1259 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1259/ ) HADOOP-12449 . TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2470 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2470/)
        HADOOP-12449. TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83)

        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2470 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2470/ ) HADOOP-12449 . TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8624 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8624/)
        HADOOP-12449. TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8624 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8624/ ) HADOOP-12449 . TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #523 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/523/)
        HADOOP-12449. TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83)

        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #523 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/523/ ) HADOOP-12449 . TestDNS and TestNetUtils failing if no network. (stevel) (stevel: rev 59e9980117888958714b54bcd5c22e7de879cc83) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestDNS.java
        Hide
        stevel@apache.org Steve Loughran added a comment -

        committed -thanks for the review

        Show
        stevel@apache.org Steve Loughran added a comment - committed -thanks for the review
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        -1 pre-patch 7m 28s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 2 new or modified test files.
        +1 javac 8m 2s There were no new javac warning messages.
        +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 1m 6s There were no new checkstyle issues.
        -1 whitespace 0m 0s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix.
        +1 install 1m 30s mvn install still works.
        +1 eclipse:eclipse 0m 35s The patch built with eclipse:eclipse.
        +1 findbugs 1m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 common tests 8m 1s Tests passed in hadoop-common.
            29m 3s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12764268/HADOOP-12449-001.patch
        Optional Tests javac unit findbugs checkstyle
        git revision trunk / 80d33b5
        Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/artifact/patchprocess/trunkFindbugsWarningshadoop-common.html
        whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/artifact/patchprocess/whitespace.txt
        hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/artifact/patchprocess/testrun_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/testReport/
        Java 1.7.0_55
        uname Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment -1 pre-patch 7m 28s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 2 new or modified test files. +1 javac 8m 2s There were no new javac warning messages. +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 6s There were no new checkstyle issues. -1 whitespace 0m 0s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 1m 30s mvn install still works. +1 eclipse:eclipse 0m 35s The patch built with eclipse:eclipse. +1 findbugs 1m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 8m 1s Tests passed in hadoop-common.     29m 3s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12764268/HADOOP-12449-001.patch Optional Tests javac unit findbugs checkstyle git revision trunk / 80d33b5 Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/artifact/patchprocess/trunkFindbugsWarningshadoop-common.html whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/artifact/patchprocess/whitespace.txt hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/testReport/ Java 1.7.0_55 uname Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7736/console This message was automatically generated.
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        +1 pending Jenkins.

        Verified it fixes the failure with wifi disconnected.

        Show
        arpitagarwal Arpit Agarwal added a comment - +1 pending Jenkins. Verified it fixes the failure with wifi disconnected.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        original test failures

        -----------------------------------------------
        Running org.apache.hadoop.net.TestDNS
        Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 15.556 sec <<< FAILURE! - in org.apache.hadoop.net.TestDNS
        testRDNS(org.apache.hadoop.net.TestDNS)  Time elapsed: 15.049 sec  <<< ERROR!
        javax.naming.CommunicationException: DNS error
        	at java.net.PlainDatagramSocketImpl.peekData(Native Method)
        	at java.net.DatagramSocket.receive(DatagramSocket.java:791)
        	at com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:416)
        	at com.sun.jndi.dns.DnsClient.query(DnsClient.java:210)
        	at com.sun.jndi.dns.Resolver.query(Resolver.java:81)
        	at com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:430)
        	at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231)
        	at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139)
        	at com.sun.jndi.toolkit.url.GenericURLDirContext.getAttributes(GenericURLDirContext.java:103)
        	at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:142)
        	at org.apache.hadoop.net.DNS.reverseDns(DNS.java:84)
        	at org.apache.hadoop.net.TestDNS.testRDNS(TestDNS.java:139)
        
        
        
        -------------------------------------------------------
        Running org.apache.hadoop.net.TestNetUtils
        Tests run: 40, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.998 sec <<< FAILURE! - in org.apache.hadoop.net.TestNetUtils
        testNormalizeHostName(org.apache.hadoop.net.TestNetUtils)  Time elapsed: 0.018 sec  <<< FAILURE!
        java.lang.AssertionError: Element 2 equal original [127.0.0.1, localhost, 1.kanyezone.appspot.com, UnknownHost123] normalized [127.0.0.1, 127.0.0.1, 1.kanyezone.appspot.com, UnknownHost123]
        	at org.junit.Assert.fail(Assert.java:88)
        	at org.junit.Assert.assertTrue(Assert.java:41)
        	at org.junit.Assert.assertFalse(Assert.java:64)
        	at org.apache.hadoop.net.TestNetUtils.testNormalizeHostName(TestNetUtils.java:632)
        
        Show
        stevel@apache.org Steve Loughran added a comment - original test failures ----------------------------------------------- Running org.apache.hadoop.net.TestDNS Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 15.556 sec <<< FAILURE! - in org.apache.hadoop.net.TestDNS testRDNS(org.apache.hadoop.net.TestDNS) Time elapsed: 15.049 sec <<< ERROR! javax.naming.CommunicationException: DNS error at java.net.PlainDatagramSocketImpl.peekData(Native Method) at java.net.DatagramSocket.receive(DatagramSocket.java:791) at com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:416) at com.sun.jndi.dns.DnsClient.query(DnsClient.java:210) at com.sun.jndi.dns.Resolver.query(Resolver.java:81) at com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:430) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139) at com.sun.jndi.toolkit.url.GenericURLDirContext.getAttributes(GenericURLDirContext.java:103) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:142) at org.apache.hadoop.net.DNS.reverseDns(DNS.java:84) at org.apache.hadoop.net.TestDNS.testRDNS(TestDNS.java:139) ------------------------------------------------------- Running org.apache.hadoop.net.TestNetUtils Tests run: 40, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.998 sec <<< FAILURE! - in org.apache.hadoop.net.TestNetUtils testNormalizeHostName(org.apache.hadoop.net.TestNetUtils) Time elapsed: 0.018 sec <<< FAILURE! java.lang.AssertionError: Element 2 equal original [127.0.0.1, localhost, 1.kanyezone.appspot.com, UnknownHost123] normalized [127.0.0.1, 127.0.0.1, 1.kanyezone.appspot.com, UnknownHost123] at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.assertTrue(Assert.java:41) at org.junit.Assert.assertFalse(Assert.java:64) at org.apache.hadoop.net.TestNetUtils.testNormalizeHostName(TestNetUtils.java:632)
        Hide
        stevel@apache.org Steve Loughran added a comment -

        fixes for tests. For the TestNetUtils one, the args for expectEquals were swapped with expected ahead of actual, and diagnostics text included for all assertions. Then the test was changed to skip on DNS.

        TestDNS handles a new way for things to fail.

        Show
        stevel@apache.org Steve Loughran added a comment - fixes for tests. For the TestNetUtils one, the args for expectEquals were swapped with expected ahead of actual, and diagnostics text included for all assertions. Then the test was changed to skip on DNS. TestDNS handles a new way for things to fail.

          People

          • Assignee:
            stevel@apache.org Steve Loughran
            Reporter:
            stevel@apache.org Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development