Test case 
org.apache.openejb.config.ConfigurationFactoryTest#testConfigureApplicationWebModule
 fails while building OEJB
------------------------------------------------------------------------------------------------------------------------

                 Key: OPENEJB-1022
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1022
             Project: OpenEJB
          Issue Type: Bug
          Components: tests
    Affects Versions: (trunk/openejb3)
         Environment: Windows XP SP2

            Reporter: Mohammad Nour
            Assignee: Mohammad Nour
             Fix For: (trunk/openejb3)


As shown below, the test case fails because we used a hard-coded file.separator 
"/" which will not work on Windows machines. I used the 
System.getProperty("file.separator") instead.

-------------------------------------------------------------------------------
Test set: org.apache.openejb.config.ConfigurationFactoryTest
-------------------------------------------------------------------------------
Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.016 sec <<< 
FAILURE!
testConfigureApplicationWebModule(org.apache.openejb.config.ConfigurationFactoryTest)
  Time elapsed: 0 sec  <<< ERROR!
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1762)
        at java.lang.String.substring(String.java:1735)
        at org.apache.openejb.config.WebModule.<init>(WebModule.java:54)
        at 
org.apache.openejb.config.ConfigurationFactoryTest.testConfigureApplicationWebModule(ConfigurationFactoryTest.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
        at 
org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
        at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
        at 
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
        at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
        at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
        at 
org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
        at 
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
        at 
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
        at 
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
        at 
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
        at 
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
        at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
        at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to