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

MigratorTest fails on two of the 3 tests.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 14.0.2
    • Fix Version/s: 17.0.0
    • Component/s: Testing / JUnit
    • Security Level: Default (Default Security Scheme)
    • Labels:

      Description

      There seems to be some special order for building and running unit tests to make org.opennms.core.test.db.MigratorTest not fail with errors.

      This sequence of build+assemble+unit-test fails:

      ./clean.pl
      ./compile.pl --fail-at-end install
      ./assemble.pl -Dopennms.home=/usr/local/opennms --fail-at-end install
      ./bin/bamboo.pl --fail-at-end -Dorg.opennms.core.test-api.snmp.useMockSnmpStrategy=false -DupdatePolicy=never -Pbuild-bamboo --batch-mode -t test

      with this exception:

      2014-12-11 21:11:53,835 DEBUG [main] org.opennms.core.test.OpenNMSAbstractTestExecutionListener - starting test method public void org.opennms.core.test.db.MigratorTest.testUpdate() throws java.lang.Exception
      SLF4J: Failed toString() invocation on an object of type [org.opennms.core.schema.Migration]
      java.lang.NullPointerException
      at org.opennms.core.schema.ExistingResourceAccessor.toString(ExistingResourceAccessor.java:76)
      at java.lang.String.valueOf(String.java:2847)
      at java.lang.StringBuffer.append(StringBuffer.java:232)
      at org.apache.commons.lang.builder.ToStringStyle.appendDetail(ToStringStyle.java:585)
      at org.apache.commons.lang.builder.ToStringStyle.appendInternal(ToStringStyle.java:549)
      at org.apache.commons.lang.builder.ToStringStyle.append(ToStringStyle.java:435)
      at org.apache.commons.lang.builder.ToStringBuilder.append(ToStringBuilder.java:851)
      at org.opennms.core.schema.Migration.toString(Migration.java:234)
      at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:305)
      at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:277)
      at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:231)
      at org.slf4j.helpers.MessageFormatter.format(MessageFormatter.java:152)
      at org.opennms.core.test.MockLogger.formatAndLog(MockLogger.java:331)
      at org.opennms.core.test.MockLogger.info(MockLogger.java:463)
      at org.opennms.core.test.db.MigratorTest.testUpdate(MigratorTest.java:111)
      ....

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: