This is an automated email from the ASF dual-hosted git repository.
fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new c659da2 Round deadline to upper second in our race against the flaky
test
c659da2 is described below
commit c659da2290afdfd8ecfe586af0e23d5b2f53294a
Author: Felix Schumacher <[email protected]>
AuthorDate: Tue Sep 1 21:07:45 2020 +0200
Round deadline to upper second in our race against the flaky test
---
.../org/apache/jmeter/protocol/http/control/TestCacheManagerBase.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/control/TestCacheManagerBase.java
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/control/TestCacheManagerBase.java
index d35456c..1c9f358 100644
---
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/control/TestCacheManagerBase.java
+++
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/control/TestCacheManagerBase.java
@@ -86,7 +86,8 @@ public abstract class TestCacheManagerBase extends
JMeterTestCase {
protected abstract void setRequestHeaders();
protected void sleepTill(long deadline) {
- while (System.currentTimeMillis() < deadline) {
+ long roundedToUpperSecond = Math.round(Math.ceil(deadline / 1000.0)) *
1000;
+ while (System.currentTimeMillis() < roundedToUpperSecond) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {