langtools/test/tools/sjavac/IdleShutdown.java
changeset 32335 7df616378cf3
parent 30730 d3ce7619db2c
child 32337 c9d3ab9f601c
--- a/langtools/test/tools/sjavac/IdleShutdown.java	Mon Aug 24 13:15:12 2015 +0100
+++ b/langtools/test/tools/sjavac/IdleShutdown.java	Tue Aug 25 15:14:41 2015 +0200
@@ -31,17 +31,11 @@
  * @build Wrapper
  * @run main Wrapper IdleShutdown
  */
-import java.io.File;
-import java.net.URI;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 
 import com.sun.tools.sjavac.server.CompilationResult;
 import com.sun.tools.sjavac.server.IdleResetSjavac;
 import com.sun.tools.sjavac.server.Sjavac;
-import com.sun.tools.sjavac.server.SysInfo;
 import com.sun.tools.sjavac.server.Terminable;
 
 
@@ -70,35 +64,14 @@
         if (timeoutTimestamp.get() != -1)
             throw new AssertionError("Premature timeout detected.");
 
-        // Call various methods and wait less than TIMEOUT_MS in between
-        Thread.sleep(TIMEOUT_MS - 1000);
-        log("Getting sys info");
-        service.getSysInfo();
-
+        // Use Sjavac object and wait less than TIMEOUT_MS in between calls
         Thread.sleep(TIMEOUT_MS - 1000);
-        log("Getting sys info");
-        service.getSysInfo();
-
-        if (timeoutTimestamp.get() != -1)
-            throw new AssertionError("Premature timeout detected.");
+        log("Compiling");
+        service.compile(new String[0]);
 
         Thread.sleep(TIMEOUT_MS - 1000);
         log("Compiling");
-        service.compile("",
-                        "",
-                        new String[0],
-                        Collections.<File>emptyList(),
-                        Collections.<URI>emptySet(),
-                        Collections.<URI>emptySet());
-
-        Thread.sleep(TIMEOUT_MS - 1000);
-        log("Compiling");
-        service.compile("",
-                        "",
-                        new String[0],
-                        Collections.<File>emptyList(),
-                        Collections.<URI>emptySet(),
-                        Collections.<URI>emptySet());
+        service.compile(new String[0]);
 
         if (timeoutTimestamp.get() != -1)
             throw new AssertionError("Premature timeout detected.");
@@ -129,7 +102,10 @@
 
     private static class NoopJavacService implements Sjavac {
         @Override
-        public SysInfo getSysInfo() {
+        public void shutdown() {
+        }
+        @Override
+        public CompilationResult compile(String[] args) {
             // Attempt to trigger idle timeout during a call by sleeping
             try {
                 Thread.sleep(TIMEOUT_MS + 1000);
@@ -137,21 +113,5 @@
             }
             return null;
         }
-        @Override
-        public void shutdown() {
-        }
-        @Override
-        public CompilationResult compile(String protocolId,
-                                         String invocationId,
-                                         String[] args,
-                                         List<File> explicitSources,
-                                         Set<URI> sourcesToCompile,
-                                         Set<URI> visibleSources) {
-            return null;
-        }
-        @Override
-        public String serverSettings() {
-            return "";
-        }
     }
 }