Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-1314

Helpless error message while a LDIF import fails in unit tests

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 2.0.0-M1
    • Component/s: None
    • Labels:
      None

      Description

      Helpless error message while a LDIF import fails in unit tests.

      I have some unit tests that are using our very useful annotation system but there's one thing I find not very helpful, it's the error reporting while an erroneous LDIF is being loaded.

      Here's an example I get when the file I try to load does not exist.
      --------------------------------------------------------------------------------
      log4j:WARN No appenders could be found for logger (org.apache.directory.server.integ.SiRunner).
      log4j:WARN Please initialize the log4j system properly.
      Ldap service started.
      java.lang.NoSuchMethodError: org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
      at org.apache.directory.server.integ.state.StartedPristineState.test(StartedPristineState.java:199)
      at org.apache.directory.server.integ.state.NonExistentState.test(NonExistentState.java:213)
      at org.apache.directory.server.integ.state.TestServerContext.test(TestServerContext.java:187)
      at org.apache.directory.server.integ.SiRunner.invokeTestMethod(SiRunner.java:103)
      at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:59)
      at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52)
      at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
      at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
      at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50)
      at org.apache.directory.server.integ.SiRunner.run(SiRunner.java:77)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      --------------------------------------------------------------------------------
      Not that helpful...

      An error is logged as ERROR in the 'org.apache.directory.server.core.integ.state.AbstractState' class:
      --------------------------------------------------------------------------------
      catch ( Exception e )
      {
      LOG.error( "Cannot inject the following entry : {}. Error : {}.", ldifFile, e.getMessage() );
      }
      --------------------------------------------------------------------------------
      but this is not reported to the RunNotifier.

      Maybe it should be...

        Activity

        Hide
        Emmanuel Lecharny added a comment -

        Postponed to 2.0.0-RC1

        Show
        Emmanuel Lecharny added a comment - Postponed to 2.0.0-RC1
        Hide
        Pierre-Arnaud Marcelot added a comment -

        Things have changed a lot lately and I think it would be good that I verify if the issue is still there.

        Show
        Pierre-Arnaud Marcelot added a comment - Things have changed a lot lately and I think it would be good that I verify if the issue is still there.
        Hide
        Pierre-Arnaud Marcelot added a comment -

        Fixed

        Show
        Pierre-Arnaud Marcelot added a comment - Fixed

          People

          • Assignee:
            Pierre-Arnaud Marcelot
            Reporter:
            Pierre-Arnaud Marcelot
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development