You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2021/06/18 20:54:57 UTC
[flink] branch master updated: [FLINK-20891][metrics][tests] Check
that thread is still alive
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 246f0db [FLINK-20891][metrics][tests] Check that thread is still alive
246f0db is described below
commit 246f0db2b7410bcd534c39e1a5b93a0cba6bffc7
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Jun 8 13:22:07 2021 +0200
[FLINK-20891][metrics][tests] Check that thread is still alive
---
.../apache/flink/runtime/metrics/utils/SystemResourcesCounterTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/metrics/utils/SystemResourcesCounterTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/metrics/utils/SystemResourcesCounterTest.java
index ae89df5..d3f978a 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/metrics/utils/SystemResourcesCounterTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/metrics/utils/SystemResourcesCounterTest.java
@@ -42,7 +42,8 @@ public class SystemResourcesCounterTest {
do {
Thread.sleep(1);
cpuIdle = systemResources.getCpuIdle();
- } while (initialCpuIdle == cpuIdle || Double.isNaN(cpuIdle) || cpuIdle == 0.0);
+ } while (systemResources.isAlive()
+ && (initialCpuIdle == cpuIdle || Double.isNaN(cpuIdle) || cpuIdle == 0.0));
} finally {
systemResources.shutdown();
systemResources.join();