8213576: Make test AsyncCloseChannel.java run in othervm
authoramlu
Fri, 09 Nov 2018 12:08:53 +0800
changeset 52467 1256c8d923e8
parent 52466 3b1d026699fc
child 52468 e0fd97beab7e
8213576: Make test AsyncCloseChannel.java run in othervm Reviewed-by: dholmes
test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java
--- a/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java	Thu Nov 08 20:54:30 2018 -0500
+++ b/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java	Fri Nov 09 12:08:53 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2018, 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
@@ -24,13 +24,16 @@
 /* @test
  * @bug 6285901 6501089
  * @summary Check no data is written to wrong socket channel during async closing.
- * @author Xueming Shen
+ * @run main/othervm AsyncCloseChannel
  */
 
-import java.io.*;
-import java.nio.*;
-import java.nio.channels.*;
-import java.net.*;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.nio.ByteBuffer;
+import java.nio.channels.ClosedChannelException;
+import java.nio.channels.SocketChannel;
 
 public class AsyncCloseChannel {
     static volatile boolean failed = false;