Invictum / serenity-reportportal-integration

Serenity TAF integration with Report Portal
Apache License 2.0
20 stars 19 forks source link

ReportPortal return error when parallel execution #127

Closed billyjulius closed 10 months ago

billyjulius commented 4 years ago

I am using Serenity with Cucumber, and ReportPortal return this error when run multiple cucumber runner in parallel. This happens sometimes and random (not all scenario, but random each run)

[rp-io-75] ERROR com.epam.reportportal.service.Launch - [103] ReportPortal execution error
com.epam.reportportal.exception.ReportPortalException: Report Portal returned error
Status code: 406
Status message: Not Acceptable
Error Message: Start time of child ['Wed Sep 23 02:58:08 UTC 2020'] item should be same or later than start time ['2020-09-23T02:58:09.706'] of the parent item/launch '25093'
Error Type: CHILD_START_TIME_EARLIER_THAN_PARENT
    at com.epam.reportportal.service.ReportPortalErrorHandler.handleError(ReportPortalErrorHandler.java:85)
    at com.epam.reportportal.service.ReportPortalErrorHandler.handle(ReportPortalErrorHandler.java:61)
    at com.epam.reportportal.restendpoint.http.HttpClientRestEndpoint$1.subscribe(HttpClientRestEndpoint.java:526)
    at io.reactivex.internal.operators.maybe.MaybeCreate.subscribeActual(MaybeCreate.java:45)
    at io.reactivex.Maybe.subscribe(Maybe.java:4290)
    at io.reactivex.internal.operators.maybe.MaybeSubscribeOn$SubscribeTask.run(MaybeSubscribeOn.java:54)
    at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
    at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Parallel configuration in maven failsafe

<configuration>
  <includes>
    <include>**/*TestSuite.java</include>
    <include>**/*IT.java</include>
  </includes>
  <argLine>-Xmx512m</argLine>
  <parallel>classes</parallel>
  <threadCount>2</threadCount>
  <perCoreThreadCount>false</perCoreThreadCount>
</configuration>              

Version used serenity-reportportal-integration: 1.5.3 serenity-core: 2.1.4

Invictum commented 4 years ago

@billyjulius Unfortunately parallel mode isn't supported for now.

billyjulius commented 4 years ago

@Invictum Found the cause of this error, apparently it is caused by integration trying to post all the step of each DataDriven Scenario (Scenario Outline & Examples in Cucumber) and using its each step StartTime, meanwhile the parent test item started using StartTime of the LAST DataDriven Scenario.

Invictum commented 4 years ago

Thanks for the investigation. Can you provide a simple and synthetic project for debug, so I will try to fix it?

On Sep 25, 2020, at 04:43, Billy Julius notifications@github.com wrote:

 @Invictum Found the cause of this error, apparently it is caused by integration trying to post all the step of each DataDriven Scenario (Scenario Outline & Examples in Cucumber) and using its each step StartTime, meanwhile the parent test item using StartTime of the last DataDriven Scenario.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.