JDK 9 RFR of JDK-8144880: Instrument intermittently failing test ConfigChanges.java

joe darcy joe.darcy at oracle.com
Mon Dec 7 21:39:37 UTC 2015


Hello,

Please review the changes to address

     JDK-8144880: Instrument intermittently failing test ConfigChanges.java

The test

     java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java

fails intermittently and uses randomness. In the patch below, It is 
marked accordingly and downgraded from tier 1 to tier 2 until the 
problem problem in bug JDK-8139237 is addressed.

Thanks,

-Joe

diff -r dc3322ef23ff test/TEST.groups
--- a/test/TEST.groups    Mon Dec 07 12:35:37 2015 +0100
+++ b/test/TEST.groups    Mon Dec 07 13:39:12 2015 -0800
@@ -32,6 +32,7 @@
      :jdk_util \
      -java/util/WeakHashMap/GCDuringIteration.java \
      -java/util/concurrent/Phaser/Basic.java \
+    -java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java
      sun/nio/cs/ISO8859x.java \
      java/nio/Buffer \
      com/sun/crypto/provider/Cipher \
@@ -42,6 +43,7 @@
      java/util/zip/TestLocalTime.java \
      java/util/concurrent/Phaser/Basic.java \
      java/util/WeakHashMap/GCDuringIteration.java \
+    java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java \
      :jdk_io \
      :jdk_nio \
      -sun/nio/cs/ISO8859x.java \
diff -r dc3322ef23ff 
test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java
--- a/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java 
Mon Dec 07 12:35:37 2015 +0100
+++ b/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java 
Mon Dec 07 13:39:12 2015 -0800
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights 
reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
   * @test
   * @bug 6450200
   * @summary Test proper handling of pool state changes
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.RandomFactory
   * @run main/othervm ConfigChanges
+ * @key randomness intermittent
   * @author Martin Buchholz
   */

@@ -42,11 +45,12 @@
  import java.util.concurrent.ThreadFactory;
  import java.util.concurrent.ThreadPoolExecutor;
  import java.util.concurrent.atomic.AtomicInteger;
+import jdk.testlibrary.RandomFactory;

  public class ConfigChanges {
      static final ThreadGroup tg = new ThreadGroup("pool");

-    static final Random rnd = new Random();
+    static final Random rnd = RandomFactory.getRandom();

      static void report(ThreadPoolExecutor tpe) {
          try {




More information about the core-libs-dev mailing list