8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8044131
27 * @summary Tests the hooks used for detecting idleness of the sjavac server.
28 * @modules jdk.compiler/com.sun.tools.sjavac.server
29 * @build Wrapper
30 * @run main Wrapper IdleShutdown
31 */
32 import java.util.concurrent.atomic.AtomicLong;
33
34 import com.sun.tools.javac.main.Main.Result;
35 import com.sun.tools.sjavac.server.IdleResetSjavac;
36 import com.sun.tools.sjavac.server.Sjavac;
37 import com.sun.tools.sjavac.server.Terminable;
38
39
40 public class IdleShutdown {
41
42 final static long TEST_START = System.currentTimeMillis();
43 final static long TIMEOUT_MS = 3000;
44
45 public static void main(String[] args) throws InterruptedException {
46
47 final AtomicLong timeoutTimestamp = new AtomicLong(-1);
48
49 log("Starting IdleCallbackJavacService with timeout: " + TIMEOUT_MS);
50 Sjavac service = new IdleResetSjavac(
51 new NoopJavacService(),
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8044131
27 * @summary Tests the hooks used for detecting idleness of the sjavac server.
28 * @modules jdk.compiler/com.sun.tools.javac.main
29 * jdk.compiler/com.sun.tools.sjavac.server
30 * @build Wrapper
31 * @run main Wrapper IdleShutdown
32 */
33
34 import java.util.concurrent.atomic.AtomicLong;
35
36 import com.sun.tools.javac.main.Main.Result;
37 import com.sun.tools.sjavac.server.IdleResetSjavac;
38 import com.sun.tools.sjavac.server.Sjavac;
39 import com.sun.tools.sjavac.server.Terminable;
40
41
42 public class IdleShutdown {
43
44 final static long TEST_START = System.currentTimeMillis();
45 final static long TIMEOUT_MS = 3000;
46
47 public static void main(String[] args) throws InterruptedException {
48
49 final AtomicLong timeoutTimestamp = new AtomicLong(-1);
50
51 log("Starting IdleCallbackJavacService with timeout: " + TIMEOUT_MS);
52 Sjavac service = new IdleResetSjavac(
53 new NoopJavacService(),
|