changeset 52489:1256c8d923e8

8213576: Make test AsyncCloseChannel.java run in othervm Reviewed-by: dholmes
author amlu
date Fri, 09 Nov 2018 12:08:53 +0800
parents 3b1d026699fc
children e0fd97beab7e
files test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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;