changeset 16750:9174f842811d

8175033: (se) Improve internal timing of java/nio/channels/Selector/WakeupAfterClose.java Summary: Add print of expected ClosedSelectorException Reviewed-by: alanb
author bpb
date Thu, 16 Feb 2017 12:26:23 -0800
parents 26a708e71902
children 910801555a96
files test/java/nio/channels/Selector/WakeupAfterClose.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/nio/channels/Selector/WakeupAfterClose.java	Thu Feb 16 18:28:01 2017 +0000
+++ b/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");
                 }
             }
         };