Attempt at fixinf windows hanging issue again
Slightly altered timeout uitility seems to work much better.
This commit is contained in:
@@ -99,6 +99,9 @@ public abstract class AbstractSpringBootApp implements SpringBootApp {
|
||||
String url = getJmxUrl();
|
||||
logger.info("Creating JMX connector: "+url);
|
||||
try {
|
||||
if (url==null) {
|
||||
throw new IOException("Couldn't obtain JMX url");
|
||||
}
|
||||
JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(url), null);
|
||||
logger.info("Created JMX connector: {}", connector);
|
||||
return connector;
|
||||
|
||||
@@ -136,7 +136,12 @@ public class LocalSpringBootApp extends AbstractSpringBootApp {
|
||||
|
||||
@Override
|
||||
public Properties getSystemProperties() throws Exception {
|
||||
return withTimeout(() -> vm.getSystemProperties());
|
||||
try {
|
||||
return withTimeout(() -> vm.getSystemProperties());
|
||||
} catch (Exception e) {
|
||||
logger.error("Fetching systemprops from local app failed: {}", ExceptionUtil.getMessage(e));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean containsSystemProperty(Object key) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user