You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/02/25 07:46:44 UTC

[GitHub] [shardingsphere-elasticjob] lzx404243 opened a new issue #1837: Flaky unit tests in RDBJobEventStorageTest(non-idempotent)

lzx404243 opened a new issue #1837:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1837


   ## Bug Report
   
   ### Expected behavior
   Tests `io.elasticjob.lite.event.rdb.JobEventRdbStorageTest.assertAddJobStatusTraceEventWhenFailoverWithTaskFailedState` and `io.elasticjob.lite.event.rdb.JobEventRdbStorageTest.assertAddJobStatusTraceEventWhenFailoverWithTaskStagingState` should be idempotent and pass when running twice in the same JVM
   
   ### Actual behavior
   The two tests are not idempotent and fail if run twice in the same JVM
   ### Reason analyze (If you can)
   Each of the tests pollutes some states shared among tests, causing the second test run to fail for assertions on the storage's `JobStatusTraceEvent`. For instance, the second run of `JobEventRdbStorageTest.assertAddJobStatusTraceEventWhenFailoverWithTaskFailedState` fails for the following assertion:
   
   ```
   List<JobStatusTraceEvent> jobStatusTraceEvents = storage.getJobStatusTraceEvents("fake_failed_failover_task_id");
   assertThat(jobStatusTraceEvents.size(), is(2));
   ```
   ### Steps to reproduce the behavior.
   Run each of the aforementioned tests twice in the same JVM. The second test run would fail. 
   
   ### Example codes for reproduce this issue (such as a github link).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN closed issue #1837: Flaky unit tests in RDBJobEventStorageTest(non-idempotent)

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #1837:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1837


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org