alibaba / wasp

megastore-like system
http://alibaba.github.io/wasp/
Apache License 2.0
189 stars 80 forks source link

Reducing the chance of flaky test failure #28

Open java-codehunger opened 1 year ago

java-codehunger commented 1 year ago

Description: This test is flakily fails. I run this test many times and it makes assertion fails. The failure message is as follows.

Failure: Running com.alibaba.wasp.executor.TestExecutorService Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.249 sec <<< FAILURE! testExecutorService(com.alibaba.wasp.executor.TestExecutorService) Time elapsed: 0.166 sec <<< FAILURE! java.lang.AssertionError: expected:<10> but was:<5> at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.failNotEquals(Assert.java:647) at org.junit.Assert.assertEquals(Assert.java:128) at org.junit.Assert.assertEquals(Assert.java:472) at org.junit.Assert.assertEquals(Assert.java:456) at com.alibaba.wasp.executor.TestExecutorService.testExecutorService(TestExecutorService.java:109)

Results : Failed tests: TestExecutorService.testExecutorService:109 expected:<10> but was:<5>

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

Solution: The chances of test failure is reduced simply increasing a bit more sleeping time.

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


other seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

java-codehunger commented 1 year ago

I have added CLA with my this github account.