Test fails on Windows Platform
huchangchun Mar 26, 2013 11:14 PMDear RHQ team,
when I run "mvn test" under "rhq\modules\core\util" on windows platform. I find one test fails. I checked the code and find the code is not suitable for windoes platform. Could you fix it? Many thanks.
Tests run: 189, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 17.597 sec <<<
FAILURE!
testGetPattern(org.rhq.core.util.file.FileUtilTest) Time elapsed: 0.003 sec <<
< FAILURE!
java.lang.AssertionError: The expected pattern [(/basedir/(test1\.txt))] did not
match the actual pattern [(d:\\basedir\\(test1\.txt))]
at org.rhq.core.util.file.FileUtilTest.assertPatternsRegex(FileUtilTest.
java:385)
at org.rhq.core.util.file.FileUtilTest.testGetPattern(FileUtilTest.java:
329)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocat
ionHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:702)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:894)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1219)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWork
er.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:768)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1188)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1113)
at org.testng.TestNG.run(TestNG.java:1025)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.ja
va:77)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMult
i(TestNGDirectoryTestSuite.java:159)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(Tes
tNGDirectoryTestSuite.java:99)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider
.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(
ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke
(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(Provi
derFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(Fork
edBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
75)
Results :
Failed tests: testGetPattern(org.rhq.core.util.file.FileUtilTest): The expecte
d pattern [(/basedir/(test1\.txt))] did not match the actual pattern [(d:\\based
ir\\(test1\.txt))]
Tests run: 189, Failures: 1, Errors: 0, Skipped: 0