Skip to content

Commit

Permalink
XIVY-10310 provide feedback if URI setup failed
Browse files Browse the repository at this point in the history
- e.g. due to missing ivyTestRuntime.proprties at designer or
engine-launch jvm param in Maven.
  • Loading branch information
ivy-rew committed Sep 11, 2024
1 parent 2fc0e2a commit 15af8d0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@
*/
class BaseEngineUrl {

private static final String DEFAULT_URL = "http://localhost:8081/";
static final String TEST_ENGINE_URL = "test.engine.url";

static String url() {
return new BaseEngineUrl().evaluate();
}

private String evaluate() {
var engineUrl = System.getProperty(TEST_ENGINE_URL, "http://localhost:8081/");
var engineUrl = System.getProperty(TEST_ENGINE_URL);
if (engineUrl == null || engineUrl.isBlank()) {
System.err.println("Missing system property '"+TEST_ENGINE_URL+"' falling back to '"+DEFAULT_URL+"'.");
engineUrl = DEFAULT_URL;
}
try {
return evaluate(engineUrl);
} catch(Exception ex) {
Expand Down

0 comments on commit 15af8d0

Please sign in to comment.