Attempt at fixinf windows hanging issue again

Slightly altered timeout uitility seems to work much better.
This commit is contained in:
Kris De Volder
2018-09-20 13:35:49 -07:00
parent 8eff17fc60
commit 0002646f2c
4 changed files with 11 additions and 3 deletions

View File

@@ -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;

View File

@@ -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 {