mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8361106: [TEST] com/sun/net/httpserver/Test9.java fails with java.nio.file.FileSystemException
Reviewed-by: dfuchs
This commit is contained in:
parent
dadbad0bef
commit
576f9694b0
@ -59,7 +59,7 @@ public class Test9 extends Test {
|
||||
HttpServer.class.getPackageName() + '-' + Test9.class.getSimpleName() + '-';
|
||||
|
||||
static SSLContext ctx;
|
||||
static boolean error = false;
|
||||
static volatile boolean error = false;
|
||||
|
||||
public static void main (String[] args) throws Exception {
|
||||
HttpServer s1 = null;
|
||||
@ -67,6 +67,8 @@ public class Test9 extends Test {
|
||||
ExecutorService executor=null;
|
||||
Path smallFilePath = createTempFileOfSize(TEMP_FILE_PREFIX, null, 23);
|
||||
Path largeFilePath = createTempFileOfSize(TEMP_FILE_PREFIX, null, 2730088);
|
||||
smallFilePath.toFile().deleteOnExit();
|
||||
largeFilePath.toFile().deleteOnExit();
|
||||
try {
|
||||
System.out.print ("Test9: ");
|
||||
InetAddress loopback = InetAddress.getLoopbackAddress();
|
||||
@ -122,20 +124,16 @@ public class Test9 extends Test {
|
||||
s2.stop(0);
|
||||
if (executor != null)
|
||||
executor.shutdown ();
|
||||
Files.delete(smallFilePath);
|
||||
Files.delete(largeFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
static int foo = 1;
|
||||
|
||||
static ClientThread test (boolean fixedLen, String protocol, int port, Path filePath) throws Exception {
|
||||
ClientThread t = new ClientThread (fixedLen, protocol, port, filePath);
|
||||
t.start();
|
||||
return t;
|
||||
}
|
||||
|
||||
static Object fileLock = new Object();
|
||||
static final Object fileLock = new Object();
|
||||
|
||||
static class ClientThread extends Thread {
|
||||
|
||||
@ -203,9 +201,8 @@ public class Test9 extends Test {
|
||||
error = true;
|
||||
}
|
||||
assertFileContentsEqual(filePath, temp.toPath());
|
||||
temp.delete();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("Error occurred: " + e);
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user