testng: ConcurrentModificationException

When running a test class using 6.9.13.8 the tests pass, but the following error is printed. This does not occur in 6.9.12. (Running via Eclipse)

[TestNG] Reporter org.testng.reporters.JUnitReportReporter@2b552920 failed
java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
    at java.util.ArrayList$Itr.next(ArrayList.java:851)
    at org.testng.reporters.JUnitReportReporter.getNextConfiguration(JUnitReportReporter.java:220)
    at org.testng.reporters.JUnitReportReporter.generateReport(JUnitReportReporter.java:105)
    at org.testng.TestNG.generateReports(TestNG.java:1175)
    at org.testng.TestNG.run(TestNG.java:1102)
    at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:152)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:57)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 49 (23 by maintainers)

Commits related to this issue

Most upvoted comments

The fix should be available in the next release.

When shall we release next version. See the problem on 6.9.13.8 with Eclipse. Thanks!

@anand853 - There are no work arounds for this. Extent Reports needs to fix itself so that it doesn’t try to modify and iterate a List at the same time without any sort of synchronization mechanism that wraps access to the list. That would ensure that you don’t see this exception from extent reports. Not much can be done, apart from fixing the problematic code.

TestNG 6.10 is released. TestNG Eclipse Plugin 6.10.x is still in beta, will be released in any seconds.

@anand853 - This is not a problem from TestNG. Looks like you are facing this problem from extent reports, to be specific this method. I would suggest that you please file a bug here

I am new to TestNG and am trying to pick up this new version but the instructions I’ve found don’t appear to work for installing the jar in Eclipse Neon. Is an updated plub-in going to be on the Marketplace soon? Or can someone point me good instructions for installing from a jar? Thanks in advance.