Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9378

The neither test in DNSResolutionMonitorTest fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 19.1.0
    • Fix Version/s: 21.0.0
    • Component/s: Testing / JUnit
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      I have the unfortunate case at home where my ISP hijacks all DNS calls and returns a DNS entry if there is no result found. This causes the "neither" tests to fail in DNSResolutionMonitorTest.

      There should be a flage

      ------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running org.opennms.netmgt.poller.monitors.DNSResolutionMonitorTest
      Initializing MockLogger.
      Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.549 sec <<< FAILURE! - in org.opennms.netmgt.poller.monitors.DNSResolutionMonitorTest
      testPoll(org.opennms.netmgt.poller.monitors.DNSResolutionMonitorTest)  Time elapsed: 0.375 sec  <<< FAILURE!
      java.lang.AssertionError: expected:<Down> but was:<Up>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotEquals(Assert.java:834)
      	at org.junit.Assert.assertEquals(Assert.java:118)
      	at org.junit.Assert.assertEquals(Assert.java:144)
      	at org.opennms.netmgt.poller.monitors.DNSResolutionMonitorTest.testPoll(DNSResolutionMonitorTest.java:94)
      
      testPoll(org.opennms.netmgt.poller.monitors.DNSResolutionMonitorTest)  Time elapsed: 0.172 sec  <<< FAILURE!
      java.lang.AssertionError: expected:<Down> but was:<Up>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotEquals(Assert.java:834)
      	at org.junit.Assert.assertEquals(Assert.java:118)
      	at org.junit.Assert.assertEquals(Assert.java:144)
      	at org.opennms.netmgt.poller.monitors.DNSResolutionMonitorTest.testPoll(DNSResolutionMonitorTest.java:94)
      
      
      Results :
      
      Failed tests: 
      org.opennms.netmgt.poller.monitors.DNSResolutionMonitorTest.testPoll(org.opennms.netmgt.poller.monitors.DNSResolutionMonitorTest)
        Run 1: DNSResolutionMonitorTest.testPoll:94 expected:<Down> but was:<Up>
        Run 2: DNSResolutionMonitorTest.testPoll:94 expected:<Down> but was:<Up>
      
      
      
      
      Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
      

        Attachments

          Activity

            People

            • Assignee:
              ronald.roskens@biworldwide.com Ron Roskens
              Reporter:
              ronald.roskens@biworldwide.com Ron Roskens
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: