From 223f93b3c07503ff74a44cce644615e9fb8e0d67 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Sat, 27 Apr 2024 02:03:50 -0700 Subject: [PATCH] Flake in `GNUCLibraryTest` (#9197) --- .../src/test/java/hudson/util/jna/GNUCLibraryTest.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/src/test/java/hudson/util/jna/GNUCLibraryTest.java b/core/src/test/java/hudson/util/jna/GNUCLibraryTest.java index c0987d7d4e8e..d3b7bea3864a 100644 --- a/core/src/test/java/hudson/util/jna/GNUCLibraryTest.java +++ b/core/src/test/java/hudson/util/jna/GNUCLibraryTest.java @@ -6,7 +6,6 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; -import com.sun.jna.Native; import hudson.Functions; import java.io.IOException; import java.nio.file.Files; @@ -15,7 +14,6 @@ public class GNUCLibraryTest { - private static final int EBADF = 9; private static final int O_CREAT = "Linux".equals(System.getProperty("os.name")) ? 64 : 512; private static final int O_RDWR = 2; @@ -29,10 +27,6 @@ public void openTest() throws IOException { int result = GNUCLibrary.LIBC.close(fd); assertEquals(0, result); - result = GNUCLibrary.LIBC.close(fd); - assertEquals(-1, result); - assertEquals(EBADF, Native.getLastError()); - Path tmpFile = Files.createTempFile("openTest", null); Files.delete(tmpFile); assertFalse(Files.exists(tmpFile)); @@ -56,10 +50,6 @@ public void closeTest() { int result = GNUCLibrary.LIBC.close(fd); assertEquals(0, result); - - result = GNUCLibrary.LIBC.close(fd); - assertEquals(-1, result); - assertEquals(EBADF, Native.getLastError()); } @Test