Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-05-07 16:59:58 -0400
committerRyan D. Brooks2015-05-12 19:37:40 -0400
commit7f86b732253e58b6c850f9bc0a984d85302cb990 (patch)
tree120ce35a6fe55fbf1ff4a44fea78ffacc8666f12 /plugins/org.eclipse.osee.x.server.integration.tests
parent0c09b84159aa141eb839731ae851e9375cbb88a5 (diff)
downloadorg.eclipse.osee-7f86b732253e58b6c850f9bc0a984d85302cb990.tar.gz
org.eclipse.osee-7f86b732253e58b6c850f9bc0a984d85302cb990.tar.xz
org.eclipse.osee-7f86b732253e58b6c850f9bc0a984d85302cb990.zip
refinement: Reduce redundancy of server uri property and give default
Diffstat (limited to 'plugins/org.eclipse.osee.x.server.integration.tests')
-rw-r--r--plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java
index 5691b43f77..cb357675f7 100644
--- a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java
+++ b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.x.server.integration.tests.util;
+import static org.eclipse.osee.orcs.rest.client.OseeClient.OSEE_APPLICATION_SERVER;
import java.util.HashMap;
import java.util.Map;
import org.databene.contiperf.junit.ContiPerfRule;
@@ -26,9 +27,6 @@ import org.junit.rules.MethodRule;
public final class IntegrationUtil {
- private static final String OSEE_APPLICATION_SERVER = "osee.application.server";
- private static final String DEFAULT_OSEE_APPLICATION_SERVER = "http://localhost:8089";
-
private IntegrationUtil() {
// Utility class
}
@@ -42,10 +40,13 @@ public final class IntegrationUtil {
return OseeClientStandaloneSetup.createClient(config);
}
+ private static String getOseeApplicationServer() {
+ return System.getProperty(OSEE_APPLICATION_SERVER, "http://localhost:8089");
+ }
+
private static Map<String, Object> createClientConfig() {
Map<String, Object> config = new HashMap<String, Object>();
- String serverAddress = System.getProperty(OSEE_APPLICATION_SERVER, DEFAULT_OSEE_APPLICATION_SERVER);
- config.put(OSEE_APPLICATION_SERVER, serverAddress);
+ config.put(OSEE_APPLICATION_SERVER, getOseeApplicationServer());
return config;
}
@@ -55,9 +56,7 @@ public final class IntegrationUtil {
}
public static AtsJaxRsApi createAtsClient() {
- Map<String, Object> properties = createClientConfig();
- String address = properties != null ? (String) properties.get(OSEE_APPLICATION_SERVER) : null;
- String atsUri = String.format("%s/ats", address);
+ String atsUri = String.format("%s/ats", getOseeApplicationServer());
AtsJaxRsApi atsEndpoint = JaxRsClient.newBuilder() //
.createThreadSafeProxyClients(true) // if the client needs to be shared between threads

Back to the top