Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-178

org.apache.commons.cli.ParserTestCase: Test doesn't pass on Sun JDK 1.6.0.12, Gentoo Linux

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.2
    • 1.3
    • CLI-1.x
    • None
    • Gentoo Linux, Sun JDK 1.6.0.12

    Description

      Hello, I was bumping the Gentoo version of commons-CLI to 1.2 and in the process tried to run the tests. It fails at this test:

      [junit] Testsuite: org.apache.commons.cli.ParserTestCase
      [junit] at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
      [junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      [junit] at junit.framework.TestSuite.createTest(TestSuite.java:54)
      [junit] at junit.framework.TestSuite.addTestMethod(TestSuite.java:280)
      [junit] at junit.framework.TestSuite.<init>(TestSuite.java:140)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:396)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
      [junit] ))
      [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.073 sec
      [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.073 sec
      [junit]
      [junit] Testcase: warning took 0.005 sec
      [junit] FAILED
      [junit] Cannot instantiate test case: testSimpleShort (java.lang.InstantiationException
      [junit] at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
      [junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      [junit] at junit.framework.TestSuite.createTest(TestSuite.java:54)
      [junit] at junit.framework.TestSuite.addTestMethod(TestSuite.java:280)
      [junit] at junit.framework.TestSuite.<init>(TestSuite.java:140)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:396)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
      [junit] )
      [junit] junit.framework.AssertionFailedError: Cannot instantiate test case: testSimpleShort (java.lang.InstantiationException
      [junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      [junit] )
      [junit]

      Note that the others tests before run fine. Note that when using Maven all the tests run fine but only because the problematic test is NOT run. Does that means that it should not be run? (I used mvn ant:ant to generate an Ant buildfile as Gentoo packaging system does not support Maven yet).

      Attachments

        Activity

          People

            Unassigned Unassigned
            elvanor Jean-Noel Rivasseau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: