treasure-data / td-client-java

Java Client Library for Treasure Data
http://docs.treasuredata.com/articles/java
Apache License 2.0
12 stars 22 forks source link

Flaky test: TestTDHttpClient#retryOn429 #230

Closed exoego closed 1 year ago

exoego commented 1 year ago

See https://app.circleci.com/insights/github/treasure-data/td-client-java/workflows/workflow/tests?branch=master See https://app.circleci.com/pipelines/github/treasure-data/td-client-java/270/workflows/51382faf-0cd2-414c-953e-a6d8b21d2e40/jobs/1088

com.treasuredata.client.TestTDHttpClient#retryOn429 fails quite often and retry fixes it. The test case asserts that system waits for the given timeout (5 sec). It looks like that timing is not so accurate in micro-seconds order.

java.lang.AssertionError: 
Expected: a value equal to or greater than <5000000000L>
     but: <4999688441L> was less than <5000000000L>
    at com.treasuredata.client.TestTDHttpClient.retryOn429(TestTDHttpClient.java:176)