8207166: jdk/jshell/JdiHangingLaunchExecutionControlTest.java - launch timeout

Reviewed-by: vromero
This commit is contained in:
Daniel D. Daugherty 2022-09-07 18:30:16 +00:00
parent d36abbe8da
commit 02dce24b59
2 changed files with 9 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2022, 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
@ -30,12 +30,15 @@ import jdk.jshell.execution.RemoteExecutionControl;
import jdk.jshell.spi.ExecutionControlProvider;
/**
* Hang for three minutes (long enough to cause a timeout).
* HangingRemoteAgent main() runs in its loop for 2X the timeout
* we give the launcher to fail to attach.
*/
class HangingRemoteAgent extends RemoteExecutionControl {
private static final long DELAY = 4000L;
private static final int TIMEOUT = 2000;
private static float timeoutFactor = Float.parseFloat(System.getProperty("test.timeout.factor", "1.0"));
private static final int TIMEOUT = (int)(2000 * timeoutFactor);
private static final long DELAY = TIMEOUT * 2L;
private static final boolean INFRA_VERIFY = false;
public static void main(String[] args) throws Exception {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2022, 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
@ -23,7 +23,7 @@
/*
* @test
* @bug 8169519
* @bug 8169519 8207166
* @summary Tests for JDI connector timeout failure
* @modules jdk.jshell/jdk.jshell jdk.jshell/jdk.jshell.spi jdk.jshell/jdk.jshell.execution
* @build HangingRemoteAgent