Tencent / TubeMQ

TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong
https://inlong.apache.org/
2.02k stars 391 forks source link

Potential instable test PartitionExtTest#testPartitionExtError #48

Closed tisonkun closed 4 years ago

tisonkun commented 4 years ago

Problem description

Failed tests: testPartitionExtError(com.tencent.tubemq.client.consumer.PartitionExtTest): expected:<4096> but was:<4095>

(optional) Reproducer snippet

full log is here

tisonkun commented 4 years ago

due to it occurs in a pull request travis build I mark it as potential but the pull request should not cause any test failure.

gosonzhang commented 4 years ago

PartitionExt.procConsumeResult() returns a dynamic wait time. The limitDlt passed in setPullTempData() is only an initial value. The wait time obtained by the condition calculation is subtracted from the calculated loss result. If the test case execution process is not continuous. It is not necessarily equal to the initial value, so the setting and the return result are inconsistent. The test case is modified and should not be compared with the initial settings.


PartitionExt.procConsumeResult() 返回结果是一个动态等待时长,setPullTempData()时传入的limitDlt只是一个初始值,通过条件计算后得到的等待时长再减去计算损耗结果,如果测试用例执行过程不是连续返回结果不一定与初始值相等,从而出现设置与返回结果不一致情况,该测试用例进行修改,不应该与初始设置进行比较。

gosonzhang commented 4 years ago

Thanks @TisonKun