Skip to content

Commit

Permalink
Flake in GNUCLibraryTest (#9197)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Apr 27, 2024
1 parent 0ba5372 commit 223f93b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions core/src/test/java/hudson/util/jna/GNUCLibraryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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));
Expand All @@ -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
Expand Down

0 comments on commit 223f93b

Please sign in to comment.