flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [3/3] flink git commit: [FLINK-7354][tests] ignore "initialSeedUniquifierGenerator" thread in thread list
Date Thu, 10 Aug 2017 11:22:57 GMT
[FLINK-7354][tests] ignore "initialSeedUniquifierGenerator" thread in thread list

Netty may spawn a thread in its ThreadLocalRandom class because of some secure
random use which may be caught in our LocalFlinkMiniClusterITCase as not being
stopped. Let's tolerate this.

Alternatively, we could solve this similarly to
https://issues.apache.org/jira/browse/SOLR-10098 by setting
ThreadLocalRandom.setInitialSeedUniquifier(1L);
but that may be less future proof or even remove some randomness.

This closes #4464.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/d6126e7c
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/d6126e7c
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/d6126e7c

Branch: refs/heads/master
Commit: d6126e7ca7a973635cc0d4ebaff52f35653df503
Parents: d63d704
Author: Nico Kruber <nico@data-artisans.com>
Authored: Wed Aug 2 16:20:02 2017 +0200
Committer: zentol <chesnay@apache.org>
Committed: Thu Aug 10 11:36:30 2017 +0200

----------------------------------------------------------------------
 .../test/runtime/minicluster/LocalFlinkMiniClusterITCase.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d6126e7c/flink-tests/src/test/java/org/apache/flink/test/runtime/minicluster/LocalFlinkMiniClusterITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/runtime/minicluster/LocalFlinkMiniClusterITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/runtime/minicluster/LocalFlinkMiniClusterITCase.java
index 40c4e84..770b88c 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/runtime/minicluster/LocalFlinkMiniClusterITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/runtime/minicluster/LocalFlinkMiniClusterITCase.java
@@ -49,7 +49,12 @@ import static org.junit.Assert.fail;
  */
 public class LocalFlinkMiniClusterITCase extends TestLogger {
 
-	private static final String[] ALLOWED_THREAD_PREFIXES = { };
+	private static final String[] ALLOWED_THREAD_PREFIXES = {
+		// This is a daemon thread spawned by netty's ThreadLocalRandom class if no
+		// initialSeedUniquifier is set yet and it is sometimes spawned before this test and
+		// sometimes during this test.
+		"initialSeedUniquifierGenerator"
+	};
 
 	@Test
 	public void testLocalFlinkMiniClusterWithMultipleTaskManagers() {


Mime
View raw message