ConcurrentModificationException #1168

Closed
ben-manes opened this Issue Sep 23, 2016 · 46 comments

Comments

Projects
None yet
@ben-manes
Contributor

ben-manes commented Sep 23, 2016

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)
@ben-manes

This comment has been minimized.

Show comment
Hide comment
@ben-manes

ben-manes Sep 23, 2016

Contributor

The problem is that the removeAll is accidentally within the loop body.

for (ITestResult r : confResults) {
  if (! seen.containsKey(r.getMethod())) {
    result += r.getEndMillis() - r.getStartMillis();
    seen.put(r.getMethod(), r);
  }
  confResults.removeAll(seen.values());
}
Contributor

ben-manes commented Sep 23, 2016

The problem is that the removeAll is accidentally within the loop body.

for (ITestResult r : confResults) {
  if (! seen.containsKey(r.getMethod())) {
    result += r.getEndMillis() - r.getStartMillis();
    seen.put(r.getMethod(), r);
  }
  confResults.removeAll(seen.values());
}
@cbeust

This comment has been minimized.

Show comment
Hide comment
@cbeust

cbeust Sep 23, 2016

Owner

Good catch. Would you be willing to send a PR?

Cédric

On Fri, Sep 23, 2016 at 3:51 PM, Ben Manes notifications@github.com wrote:

The problem is that the removeAll is accidentally within the loop body.

for (ITestResult r : confResults) {
if (! seen.containsKey(r.getMethod())) {
result += r.getEndMillis() - r.getStartMillis();
seen.put(r.getMethod(), r);
}
confResults.removeAll(seen.values());
}


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1168 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAFoogjcy_B02Xw2Ctev-UfjVm-cQ8K0ks5qtFfZgaJpZM4KFdZo
.

Owner

cbeust commented Sep 23, 2016

Good catch. Would you be willing to send a PR?

Cédric

On Fri, Sep 23, 2016 at 3:51 PM, Ben Manes notifications@github.com wrote:

The problem is that the removeAll is accidentally within the loop body.

for (ITestResult r : confResults) {
if (! seen.containsKey(r.getMethod())) {
result += r.getEndMillis() - r.getStartMillis();
seen.put(r.getMethod(), r);
}
confResults.removeAll(seen.values());
}


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1168 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAFoogjcy_B02Xw2Ctev-UfjVm-cQ8K0ks5qtFfZgaJpZM4KFdZo
.

@cbeust cbeust closed this in ee78cc3 Sep 23, 2016

cbeust added a commit that referenced this issue Sep 23, 2016

Merge pull request #1169 from ben-manes/master
ConcurrentModificationException during iteration (fixes #1168)
@shabana-parveen

This comment has been minimized.

Show comment
Hide comment
@shabana-parveen

shabana-parveen Oct 4, 2016

when will we expect the issue fixed release? as I am also getting the same issue.

when will we expect the issue fixed release? as I am also getting the same issue.

@missedone

This comment has been minimized.

Show comment
Hide comment
@missedone

missedone Oct 5, 2016

Contributor

hi @shabana-parveen
the fix is available in 6.9.13.8 on jCenter.

Contributor

missedone commented Oct 5, 2016

hi @shabana-parveen
the fix is available in 6.9.13.8 on jCenter.

@shabana-parveen

This comment has been minimized.

Show comment
Hide comment
@azell

This comment has been minimized.

Show comment
Hide comment
@azell

azell Oct 11, 2016

Still seeing the error with 6.9.13.8 and u102:

Running TestSuite
[TestNG] Reporter org.testng.reporters.JUnitReportReporter@6e4de19b 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.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:132)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:193)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:94)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:147)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

POM:

      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.9.13.8</version>
      </dependency>

azell commented Oct 11, 2016

Still seeing the error with 6.9.13.8 and u102:

Running TestSuite
[TestNG] Reporter org.testng.reporters.JUnitReportReporter@6e4de19b 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.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:132)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:193)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:94)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:147)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

POM:

      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.9.13.8</version>
      </dependency>
@ben-manes

This comment has been minimized.

Show comment
Hide comment
@ben-manes

ben-manes Oct 11, 2016

Contributor

I don't see my fix in 6.9.13.8 (viewed from source jar). So while .8 was released that day, its probably from an earlier commit.

Contributor

ben-manes commented Oct 11, 2016

I don't see my fix in 6.9.13.8 (viewed from source jar). So while .8 was released that day, its probably from an earlier commit.

@gdemecki

This comment has been minimized.

Show comment
Hide comment
@gdemecki

gdemecki Oct 21, 2016

Exactly. This issue is still present in the version 6.9.13.8.

Exactly. This issue is still present in the version 6.9.13.8.

@shabana-parveen

This comment has been minimized.

Show comment
Hide comment
@shabana-parveen

shabana-parveen Oct 21, 2016

Yes, I can also see the same

shabana-parveen commented Oct 21, 2016

Yes, I can also see the same

@jeffnyman

This comment has been minimized.

Show comment
Hide comment
@jeffnyman

jeffnyman Oct 24, 2016

This issue appears to be closed but I, like others, are still seeing the issue. Just making sure that folks area aware this is still a problem, including with the 6.9.13.8 release.

This issue appears to be closed but I, like others, are still seeing the issue. Just making sure that folks area aware this is still a problem, including with the 6.9.13.8 release.

@juherr

This comment has been minimized.

Show comment
Hide comment
@juherr

juherr Oct 24, 2016

Collaborator

The fix should be available in the next release.

Collaborator

juherr commented Oct 24, 2016

The fix should be available in the next release.

@mseleng mseleng referenced this issue in mseleng/Kodemon Oct 31, 2016

Merged

Downgrade testng. #24

mseleng added a commit to mseleng/Kodemon that referenced this issue Oct 31, 2016

@bartoszmajsak bartoszmajsak referenced this issue in arquillian/arquillian-core Nov 11, 2016

Closed

testng 6.9.12+ #117

martoe pushed a commit to martoe/testng that referenced this issue Nov 11, 2016

@randy-li

This comment has been minimized.

Show comment
Hide comment
@randy-li

randy-li Nov 25, 2016

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

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

@kodayashi

This comment has been minimized.

Show comment
Hide comment
@kodayashi

kodayashi Nov 29, 2016

Hi there. Any ETA on a release vehicle that contains this fix? I'm stuck on this release due to a fix that I need in 6.9.13.x :)

Hi there. Any ETA on a release vehicle that contains this fix? I'm stuck on this release due to a fix that I need in 6.9.13.x :)

@krmahadevan

This comment has been minimized.

Show comment
Hide comment
@krmahadevan

krmahadevan Nov 30, 2016

Collaborator

@kodayashi - The latest version of TestNG viz., 6.10 is already available in bintray.

You can just add the following and you should be able to consume it

<repositories>
    <repository>
        <id>bintray-cbeust-maven</id>
        <name>bintray</name>
        <url>http://dl.bintray.com/cbeust/maven</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.10</version>
    </dependency>
</dependencies>
Collaborator

krmahadevan commented Nov 30, 2016

@kodayashi - The latest version of TestNG viz., 6.10 is already available in bintray.

You can just add the following and you should be able to consume it

<repositories>
    <repository>
        <id>bintray-cbeust-maven</id>
        <name>bintray</name>
        <url>http://dl.bintray.com/cbeust/maven</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.10</version>
    </dependency>
</dependencies>
@forresthopkinsa

This comment has been minimized.

Show comment
Hide comment
@forresthopkinsa

forresthopkinsa Nov 30, 2016

Is 6.10 stable? Production ready?

Is 6.10 stable? Production ready?

@krmahadevan

This comment has been minimized.

Show comment
Hide comment
@krmahadevan

krmahadevan Nov 30, 2016

Collaborator

Not sure what you mean by "Production ready" ? A released product is meant to be stable consumable no ?

Collaborator

krmahadevan commented Nov 30, 2016

Not sure what you mean by "Production ready" ? A released product is meant to be stable consumable no ?

@forresthopkinsa

This comment has been minimized.

Show comment
Hide comment
@forresthopkinsa

forresthopkinsa Nov 30, 2016

I'm asking if this is a Beta you're suggesting

I'm asking if this is a Beta you're suggesting

@krmahadevan

This comment has been minimized.

Show comment
Hide comment
@krmahadevan

krmahadevan Nov 30, 2016

Collaborator

No this is not a beta. This is a released version of TestNG.

Collaborator

krmahadevan commented Nov 30, 2016

No this is not a beta. This is a released version of TestNG.

@forresthopkinsa

This comment has been minimized.

Show comment
Hide comment
@forresthopkinsa

forresthopkinsa Nov 30, 2016

Cool, thanks. Is there a timeline for when it will be in Eclipse's repositories?

Cool, thanks. Is there a timeline for when it will be in Eclipse's repositories?

@krmahadevan

This comment has been minimized.

Show comment
Hide comment
@krmahadevan

krmahadevan Nov 30, 2016

Collaborator

@cbeust should be able to answer that. I know he mentioned he is going to be pushing the changes to Maven Central as well.

Collaborator

krmahadevan commented Nov 30, 2016

@cbeust should be able to answer that. I know he mentioned he is going to be pushing the changes to Maven Central as well.

@cbeust

This comment has been minimized.

Show comment
Hide comment
@cbeust

cbeust Nov 30, 2016

Owner

6.10 is available in the main JCenter, no need to point to my personal repo.

Owner

cbeust commented Nov 30, 2016

6.10 is available in the main JCenter, no need to point to my personal repo.

@dpinol

This comment has been minimized.

Show comment
Hide comment
@dpinol

dpinol Nov 30, 2016

Why is it not uploaded anymore to mvnrepository.com nor http://search.maven.org/ since 6.9.13.6?

dpinol commented Nov 30, 2016

Why is it not uploaded anymore to mvnrepository.com nor http://search.maven.org/ since 6.9.13.6?

@juherr

This comment has been minimized.

Show comment
Hide comment
@juherr

juherr Nov 30, 2016

Collaborator

Not yet but it is in progress

Collaborator

juherr commented Nov 30, 2016

Not yet but it is in progress

@cbeust

This comment has been minimized.

Show comment
Hide comment
@cbeust

cbeust Nov 30, 2016

Owner

And right now, JCenter is failing to synchronize to Maven and telling me to try again later... sigh.

Owner

cbeust commented Nov 30, 2016

And right now, JCenter is failing to synchronize to Maven and telling me to try again later... sigh.

@kiherrold

This comment has been minimized.

Show comment
Hide comment
@kiherrold

kiherrold Dec 2, 2016

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.

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.

@missedone

This comment has been minimized.

Show comment
Hide comment
@missedone

missedone Dec 2, 2016

Contributor

@kiherrold , you can install the latest beta version (6.10.x) of TestNG Eclipse Plugin, it has TestNG 6.10 embedded.
updatesite for beta: http://testng.org/eclipse-beta
detail instructions: http://testng.org/doc/download.html

Contributor

missedone commented Dec 2, 2016

@kiherrold , you can install the latest beta version (6.10.x) of TestNG Eclipse Plugin, it has TestNG 6.10 embedded.
updatesite for beta: http://testng.org/eclipse-beta
detail instructions: http://testng.org/doc/download.html

@forresthopkinsa

This comment has been minimized.

Show comment
Hide comment
@forresthopkinsa

forresthopkinsa Dec 2, 2016

Lol, so is it a Beta after all? Someone enlighten me

Lol, so is it a Beta after all? Someone enlighten me

@missedone

This comment has been minimized.

Show comment
Hide comment
@missedone

missedone Dec 2, 2016

Contributor

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

Contributor

missedone commented Dec 2, 2016

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

@kodayashi

This comment has been minimized.

Show comment
Hide comment
@kodayashi

kodayashi Dec 2, 2016

Sweet, thanks everyone!

Sweet, thanks everyone!

@forresthopkinsa

This comment has been minimized.

Show comment
Hide comment
@forresthopkinsa

forresthopkinsa Dec 2, 2016

Neat. Good work folks

Neat. Good work folks

Vla8islav pushed a commit to Vla8islav/software-testing-lessons-java that referenced this issue Dec 4, 2016

Vladislav Pilipenko
Followed the suggestion here cbeust/testng#1168 and updated TestNG to…
… the version 6.10.

It seems to be working: the java.util.ConcurrentModificationException when performing 'mvn test' is no more.
@missedone

This comment has been minimized.

Show comment
Hide comment
@missedone

missedone Dec 4, 2016

Contributor

TestNG Eclipse Plugin 6.10.0.201612030230 is released.

Contributor

missedone commented Dec 4, 2016

TestNG Eclipse Plugin 6.10.0.201612030230 is released.

@galan

This comment has been minimized.

Show comment
Hide comment
@juherr

This comment has been minimized.

Show comment
Hide comment
Collaborator

juherr commented Dec 6, 2016

@sbabcoc

This comment has been minimized.

Show comment
Hide comment
@sbabcoc

sbabcoc Dec 10, 2016

The 6.10.x release that will contain the fix for this issue has still not been posted yet. When can we expect this to be available?

sbabcoc commented Dec 10, 2016

The 6.10.x release that will contain the fix for this issue has still not been posted yet. When can we expect this to be available?

@missedone

This comment has been minimized.

Show comment
Hide comment
@missedone

missedone Dec 10, 2016

Contributor

@sbabcoc
TestNG 6.10 is available both on Maven Central and jCenter.
TestNG Eclipse Plugin 6.10.0.201612030230 is available on the release update site

Contributor

missedone commented Dec 10, 2016

@sbabcoc
TestNG 6.10 is available both on Maven Central and jCenter.
TestNG Eclipse Plugin 6.10.0.201612030230 is available on the release update site

@sbabcoc

This comment has been minimized.

Show comment
Hide comment
@sbabcoc

sbabcoc Dec 10, 2016

I upgraded to TestNG 6.10.0.201612030230, and this issue still exists.

sbabcoc commented Dec 10, 2016

I upgraded to TestNG 6.10.0.201612030230, and this issue still exists.

@missedone

This comment has been minimized.

Show comment
Hide comment
@missedone

missedone Dec 11, 2016

Contributor

@sbabcoc , Eclipse Plugin simply respects the testng jar version of your project, so could you check the testng version on your project classpath? make sure that's up to date.

Contributor

missedone commented Dec 11, 2016

@sbabcoc , Eclipse Plugin simply respects the testng jar version of your project, so could you check the testng version on your project classpath? make sure that's up to date.

gjoranv added a commit to vespa-engine/vespa that referenced this issue Jan 11, 2017

@cmcgarel cmcgarel referenced this issue in ONSdigital/dp-dd-database-loader Jan 11, 2017

Merged

Added outstanding unit tests to 'unit-test' group #13

@anand853

This comment has been minimized.

Show comment
Hide comment
@anand853

anand853 Feb 9, 2017

still i hit the same problem with testng 6.10. can you please share the workaround on this?

anand853 commented Feb 9, 2017

still i hit the same problem with testng 6.10. can you please share the workaround on this?

@juherr

This comment has been minimized.

Show comment
Hide comment
@juherr

juherr Feb 9, 2017

Collaborator

@anand853 Could you share your stacktrace? I bet the issue is not the same but a similar one.

Collaborator

juherr commented Feb 9, 2017

@anand853 Could you share your stacktrace? I bet the issue is not the same but a similar one.

@anand853

This comment has been minimized.

Show comment
Hide comment
@anand853

anand853 Feb 9, 2017

@juherr ,please find the logs

testng.xml configuration:

name="Suite" parallel="methods"

Maven Error logs:
Tests run: 331, Failures: 5, Errors: 0, Skipped: 0, Time elapsed: 1,082.119 sec <<< FAILURE!
test62(test.com.t.test.com.t.AppRoombaHelpTest) Time elapsed: 0.01 sec <<< FAILURE!
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at com.relevantcodes.extentreports.model.Test.trackLastRunStatus(Test.java:389)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:101)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:180)
at test.com.t.sitecores.curlHelpRoomba(sitecores.java:1475)
at test.com.t.test.com.t.AppRoombaHelpTest.test62(AppRoombaHelpTest.java:610)

test73(test.com.t.test.com.t.AppBraavaTermsTest) Time elapsed: 0 sec <<< FAILURE!
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at com.relevantcodes.extentreports.model.Test.trackLastRunStatus(Test.java:389)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:101)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:180)
at test.com.t.test.com.t.AppBraavaTermsTest.test73(AppBraavaTermsTest.java:604)

test77(test.com.t.test.com.t.AppBraavaTermsTest) Time elapsed: 0.169 sec <<< FAILURE!
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:451)
at org.json.JSONObject.(JSONObject.java:195)
at org.json.JSONObject.(JSONObject.java:319)
at test.com.t.sitecores.curlBraavaTermsBase(sitecores.java:1222)
at test.com.t.sitecores.curlBraavaTerms(sitecores.java:1187)
at test.com.t.test.com.t.AppBraavaTermsTest.test77(AppBraavaTermsTest.java:632)

test76(test.com.t.test.com.t.AppBraavaTermsTest) Time elapsed: 0.17 sec <<< FAILURE!
java.lang.NullPointerException: null
at com.relevantcodes.extentreports.model.Test.trackLastRunStatus(Test.java:390)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:101)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:180)
at test.com.t.sitecores.curlBraavaTerms(sitecores.java:1188)
at test.com.t.test.com.t.AppBraavaTermsTest.test76(AppBraavaTermsTest.java:626)

test66(test.com.t.test.com.t.AppBraavaTermsTest) Time elapsed: 0.17 sec <<< FAILURE!
java.lang.NullPointerException: null
at com.relevantcodes.extentreports.model.Test.trackLastRunStatus(Test.java:390)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:101)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:180)
at test.com.t.sitecores.curlBraavaTerms(sitecores.java:1188)
at test.com.t.test.com.t.AppBraavaTermsTest.test66(AppBraavaTermsTest.java:549)

Results :

Failed tests:
AppRoombaHelpTest.test62:610 » ConcurrentModification
AppBraavaTermsTest.test73:604 » ConcurrentModification
AppBraavaTermsTest.test77:632 » JSON A JSONObject text must begin with '{' at ...
AppBraavaTermsTest.test76:626 » NullPointer
AppBraavaTermsTest.test66:549 » NullPointer

Tests run: 331, Failures: 5, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18:04 min
[INFO] Finished at: 2017-02-09T09:45:25-05:00
[INFO] Final Memory: 20M/316M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project com.sitecore.irobot: There are test failures.
[ERROR]

anand853 commented Feb 9, 2017

@juherr ,please find the logs

testng.xml configuration:

name="Suite" parallel="methods"

Maven Error logs:
Tests run: 331, Failures: 5, Errors: 0, Skipped: 0, Time elapsed: 1,082.119 sec <<< FAILURE!
test62(test.com.t.test.com.t.AppRoombaHelpTest) Time elapsed: 0.01 sec <<< FAILURE!
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at com.relevantcodes.extentreports.model.Test.trackLastRunStatus(Test.java:389)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:101)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:180)
at test.com.t.sitecores.curlHelpRoomba(sitecores.java:1475)
at test.com.t.test.com.t.AppRoombaHelpTest.test62(AppRoombaHelpTest.java:610)

test73(test.com.t.test.com.t.AppBraavaTermsTest) Time elapsed: 0 sec <<< FAILURE!
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at com.relevantcodes.extentreports.model.Test.trackLastRunStatus(Test.java:389)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:101)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:180)
at test.com.t.test.com.t.AppBraavaTermsTest.test73(AppBraavaTermsTest.java:604)

test77(test.com.t.test.com.t.AppBraavaTermsTest) Time elapsed: 0.169 sec <<< FAILURE!
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:451)
at org.json.JSONObject.(JSONObject.java:195)
at org.json.JSONObject.(JSONObject.java:319)
at test.com.t.sitecores.curlBraavaTermsBase(sitecores.java:1222)
at test.com.t.sitecores.curlBraavaTerms(sitecores.java:1187)
at test.com.t.test.com.t.AppBraavaTermsTest.test77(AppBraavaTermsTest.java:632)

test76(test.com.t.test.com.t.AppBraavaTermsTest) Time elapsed: 0.17 sec <<< FAILURE!
java.lang.NullPointerException: null
at com.relevantcodes.extentreports.model.Test.trackLastRunStatus(Test.java:390)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:101)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:180)
at test.com.t.sitecores.curlBraavaTerms(sitecores.java:1188)
at test.com.t.test.com.t.AppBraavaTermsTest.test76(AppBraavaTermsTest.java:626)

test66(test.com.t.test.com.t.AppBraavaTermsTest) Time elapsed: 0.17 sec <<< FAILURE!
java.lang.NullPointerException: null
at com.relevantcodes.extentreports.model.Test.trackLastRunStatus(Test.java:390)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:101)
at com.relevantcodes.extentreports.ExtentTest.log(ExtentTest.java:180)
at test.com.t.sitecores.curlBraavaTerms(sitecores.java:1188)
at test.com.t.test.com.t.AppBraavaTermsTest.test66(AppBraavaTermsTest.java:549)

Results :

Failed tests:
AppRoombaHelpTest.test62:610 » ConcurrentModification
AppBraavaTermsTest.test73:604 » ConcurrentModification
AppBraavaTermsTest.test77:632 » JSON A JSONObject text must begin with '{' at ...
AppBraavaTermsTest.test76:626 » NullPointer
AppBraavaTermsTest.test66:549 » NullPointer

Tests run: 331, Failures: 5, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18:04 min
[INFO] Finished at: 2017-02-09T09:45:25-05:00
[INFO] Final Memory: 20M/316M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project com.sitecore.irobot: There are test failures.
[ERROR]

@krmahadevan

This comment has been minimized.

Show comment
Hide comment
@krmahadevan

krmahadevan Feb 9, 2017

Collaborator

@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

Collaborator

krmahadevan commented Feb 9, 2017

@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

@anand853

This comment has been minimized.

Show comment
Hide comment
@anand853

anand853 Feb 9, 2017

@krmahadevan ,
can you please provide me any workaround on this?

anand853 commented Feb 9, 2017

@krmahadevan ,
can you please provide me any workaround on this?

@krmahadevan

This comment has been minimized.

Show comment
Hide comment
@krmahadevan

krmahadevan Feb 9, 2017

Collaborator

@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.

Collaborator

krmahadevan commented Feb 9, 2017

@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.

@juherr

This comment has been minimized.

Show comment
Hide comment
Collaborator

juherr commented Feb 9, 2017

@anand853

This comment has been minimized.

Show comment
Hide comment
@anand853

anand853 Mar 10, 2017

version : 6.10
with the testng also im getting same error, can you please let us know which version of the jar and how to achieve parallel execution with testNG

error
java.util.ConcurrentModificationException
at test.com.t.social.A.es_(A.java:1049)

Results :

Failed tests:
AA.es_:1049 » ConcurrentModification

Tests run: 260, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 55:11 min
[INFO] Finished at: 2017-03-10T10:50:25-05:00
[INFO] Final Memory: 22M/370M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project bot: There are test failures.
[ERROR]
[ERROR] Please refer to svalidation/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

anand853 commented Mar 10, 2017

version : 6.10
with the testng also im getting same error, can you please let us know which version of the jar and how to achieve parallel execution with testNG

error
java.util.ConcurrentModificationException
at test.com.t.social.A.es_(A.java:1049)

Results :

Failed tests:
AA.es_:1049 » ConcurrentModification

Tests run: 260, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 55:11 min
[INFO] Finished at: 2017-03-10T10:50:25-05:00
[INFO] Final Memory: 22M/370M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project bot: There are test failures.
[ERROR]
[ERROR] Please refer to svalidation/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@juherr

This comment has been minimized.

Show comment
Hide comment
@juherr

juherr Mar 10, 2017

Collaborator

@anand853

java.util.ConcurrentModificationException
at test.com.t.social.A.es_(A.java:1049)

It looks the exception comes from the test itself and not TestNG

Collaborator

juherr commented Mar 10, 2017

@anand853

java.util.ConcurrentModificationException
at test.com.t.social.A.es_(A.java:1049)

It looks the exception comes from the test itself and not TestNG

@cheungtitus cheungtitus referenced this issue in kenrui-group/packetbroker Apr 29, 2018

Closed

org.testng.reporters.JUnitReportReporter failed #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment