test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/EchoService.java
changeset 51117 c96c7d08ae49
parent 47216 71c04702a3d5
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/EchoService.java	Wed Jul 18 16:13:21 2018 -0700
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/EchoService.java	Thu Jul 19 16:22:19 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -65,6 +65,8 @@
 import java.nio.channels.ServerSocketChannel;
 import java.nio.channels.SocketChannel;
 
+import jdk.test.lib.Utils;
+
 public class EchoService {
 
     private static void doIt(SocketChannel sc, int closeAfter, int delay) throws IOException {
@@ -173,7 +175,7 @@
             SocketChannel sc;
             int count = 0;
             for (;;) {
-                 sel.select(5000);
+                 sel.select((int)Utils.adjustTimeout(5000));
                  if (sk.isAcceptable() && ((sc = ssc.accept()) != null)) {
                     Worker w = new Worker(sc);
                     (new Thread(w)).start();