8175033: (se) Improve internal timing of java/nio/channels/Selector/WakeupAfterClose.java
Summary: Add print of expected ClosedSelectorException
Reviewed-by: alanb
--- a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java Thu Feb 16 18:28:01 2017 +0000
+++ b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java Thu Feb 16 12:26:23 2017 -0800
@@ -27,8 +27,9 @@
* @key intermittent
*/
+import java.io.IOException;
+import java.nio.channels.ClosedSelectorException;
import java.nio.channels.Selector;
-import java.io.IOException;
public class WakeupAfterClose {
@@ -41,6 +42,9 @@
sel.select();
} catch (IOException x) {
x.printStackTrace();
+ } catch (ClosedSelectorException y) {
+ System.err.println
+ ("Caught expected ClosedSelectorException");
}
}
};