Hi Cedric/All,
I started running my tests but have the following problem when I run it on command line using maven. I tried running many times and each time it fails with the error below.
I have 25000 messages to sent( reading from excel and sending over JMS) and sometimes it is able to send 100 and sometimes 300 to 400.
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: C:\Dev\PROJECT_NAME \target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
[TestRunner] Starting executor with time out:10000 milliseconds.
[TestRunner] Starting executor for test com.SampleMessageLoaderTest with time out:10000 milliseconds.
java.lang.InterruptedException: sleep interrupted
at java.lang.Thread.sleep(Native Method)
at org.testng.internal.PoolService.submitTasksAndWait(PoolService.java:106)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1033)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580804,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=3, id=123, name=ASam, number=580802,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580807,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=3, id=123, name=peter, number=580800
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580801,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=3, id=123, name=ASam, number=580803,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580800,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580805,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580806,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580800,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580810,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=3, id=123, name=ASam, number=580812,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=3, id=123, name=ASam, number=580809,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580811,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=3, id=123, name=ASam, number=580808,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=3, id=123, name=ASam, number=580813,
PASSED: messageLoaderTest(
org.testng.TestRunner@7cae6e, SampleMessage [type=1, id=123, name=ASam, number=580815,
Exception in thread "pool-2-thread-1" java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at org.testng.reporters.TextReporter.logResults(TextReporter.java:81)
at org.testng.reporters.TextReporter.onFinish(TextReporter.java:31)
at org.testng.TestRunner.fireEvent(TestRunner.java:1259)
at org.testng.TestRunner.afterRun(TestRunner.java:1036)
at org.testng.TestRunner.run(TestRunner.java:557)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:311)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:33)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:344)
at org.testng.internal.thread.ThreadUtil$CountDownLatchedRunnable.run(ThreadUtil.java:151)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
[TestNG] Reporter
org.testng.reporters.SuiteHTMLReporter@47858e failed
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at org.testng.reporters.SuiteHTMLReporter.generateMethodsChronologically(SuiteHTMLReporter.java:365)
at org.testng.reporters.SuiteHTMLReporter.generateReport(SuiteHTMLReporter.java:68)
at org.testng.TestNG.generateReports(TestNG.java:853)
at org.testng.TestNG.run(TestNG.java:839)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Tests run: 388, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.046 sec
Results :
Tests run: 388, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Thu Jul 15 20:30:40 BST 2010
[INFO] Final Memory: 16M/39M
[INFO] ------------------------------------------------------------------------
Just to add I have following in POM
Cedric- The version is the patch version which you gave to fix the parallel issue thing as per mail above.
The testng JAR at the compile time is testng-5.11-jdk15.jar, this is picked up automatic dependency due to Citrus integration tool that I am using.
Please let me know why its breaking.
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.12.2</version>
<scope>test</scope>
</dependency>
But, when I run from eclipse this error does not come and I am not able to use parallel=true. Not sure if that is due to some dependencies in eclipse or TestNG plugin of eclipse( I am using 3.5 ).
java.lang.IllegalArgumentException: wrong number of arguments
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:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:643)
at org.testng.internal.MethodHelper$1.runTestMethod(MethodHelper.java:761)
at org.springframework.test.context.testng.AbstractTestNGSpringContextTests.run(AbstractTestNGSpringContextTests.java:158)
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:597)
at org.testng.internal.MethodHelper.invokeHookable(MethodHelper.java:769)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:552)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:723)
at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:73)
at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:15)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Any input would be great help as I was looking to produce some results for team.
Regards
-Vinay