8202290: AtomicAppend tests fail on macOS 10.13 ("High Sierra")
authorbpb
Fri, 25 May 2018 07:22:37 -0700
changeset 50269 d8327f838b88
parent 50268 5f4f5b52ee39
child 50270 cc2b36619704
8202290: AtomicAppend tests fail on macOS 10.13 ("High Sierra") Summary: Reinstate actual running of tests for macOS version >= 10.13. Reviewed-by: alanb
test/jdk/java/io/FileOutputStream/AtomicAppend.java
test/jdk/java/nio/channels/FileChannel/AtomicAppend.java
--- a/test/jdk/java/io/FileOutputStream/AtomicAppend.java	Fri May 25 15:34:45 2018 +0530
+++ b/test/jdk/java/io/FileOutputStream/AtomicAppend.java	Fri May 25 07:22:37 2018 -0700
@@ -25,9 +25,6 @@
  * @test
  * @bug 6631352
  * @summary Check that appends are atomic
- * @library /test/lib
- * @build jdk.test.lib.Platform
- * @run main AtomicAppend
  */
 
 import java.io.File;
@@ -36,8 +33,6 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
 
-import jdk.test.lib.Platform;
-
 public class AtomicAppend {
     // Before the fix for
     // 6631352: Implement atomic append mode using FILE_APPEND_DATA (win)
@@ -78,15 +73,6 @@
         if (x == null ? y == null : x.equals(y)) pass();
         else fail(x + " not equal to " + y);}
     public static void main(String[] args) throws Throwable {
-        if (Platform.isOSX()) {
-            final String version = "10.13";
-            int ineq = Platform.compareOsVersion(version);
-            if (ineq >= 0) {
-                System.out.format("Skipping test for macOS version %s >= %s%n",
-                    Platform.getOsVersion(), version);
-                return;
-            }
-        }
         new AtomicAppend().instanceMain(args);
     }
     void instanceMain(String[] args) throws Throwable {
--- a/test/jdk/java/nio/channels/FileChannel/AtomicAppend.java	Fri May 25 15:34:45 2018 +0530
+++ b/test/jdk/java/nio/channels/FileChannel/AtomicAppend.java	Fri May 25 07:22:37 2018 -0700
@@ -24,9 +24,6 @@
 /*
  * @test
  * @summary Check that appends are atomic
- * @library /test/lib
- * @build jdk.test.lib.Platform
- * @run main AtomicAppend
  * @key randomness
  */
 
@@ -43,8 +40,6 @@
 import java.nio.file.Files;
 import static java.nio.file.StandardOpenOption.*;
 
-import jdk.test.lib.Platform;
-
 public class AtomicAppend {
     static final Random rand = new Random();
 
@@ -81,15 +76,6 @@
     }
 
     public static void main(String[] args) throws Throwable {
-        if (Platform.isOSX()) {
-            final String version = "10.13";
-            int ineq = Platform.compareOsVersion(version);
-            if (ineq >= 0) {
-                System.out.format("Skipping test for macOS version %s >= %s%n",
-                    Platform.getOsVersion(), version);
-                return;
-            }
-        }
         final int nThreads = 16;
         final int writes = 1000;
         final File file = File.createTempFile("foo", null);