[java-idp-integration-tests] 02/02: Do not add system properties multiple times

Tom Zeller tzeller at dragonacea.biz
Thu Mar 29 21:03:32 EDT 2018


This is an automated email from the git hooks/post-receive script.

tzeller pushed a commit to branch master
in repository java-idp-integration-tests.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=1f610ae8159fef62bc342727a0099286fbd74063

commit 1f610ae8159fef62bc342727a0099286fbd74063
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Thu Mar 29 20:02:58 2018 -0500

    Do not add system properties multiple times
    
    For classes with multiple methods, the command line used to start the
    Jetty server process would contain multiple identical system property
    declarations.
---
 .../java/net/shibboleth/idp/test/BaseIntegrationTest.java     | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
index 65fb90d..7f3ef6d 100644
--- a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
@@ -380,7 +380,7 @@ public abstract class BaseIntegrationTest
      * 
      * @throws Exception if an error occurs
      */
-    @BeforeClass
+    @BeforeClass(dependsOnMethods = {"setUpIdPPaths"})
     public void setUpTomcatPaths() throws Exception {
 
         // Path to the project build directory.
@@ -434,7 +434,7 @@ public abstract class BaseIntegrationTest
      * 
      * @throws Exception if an error occurs
      */
-    @BeforeClass
+    @BeforeClass(dependsOnMethods = {"setUpIdPPaths"})
     public void setUpJettyPaths() throws Exception {
 
         if (Boolean.getBoolean("tomcat")) {
@@ -470,6 +470,9 @@ public abstract class BaseIntegrationTest
 
             // Make tmp directories exist
             Assert.assertTrue(pathToJettyBase.resolve("tmp").toFile().exists(), "Path to jetty.base/tmp/ not found");
+            
+            serverCommands.add(0, "-Didp.home=" + System.getProperty("idp.home"));
+            serverCommands.add("-Djava.io.tmpdir=" + pathToJettyBase.resolve("tmp").toAbsolutePath());
         } else {
             Assert.fail("Unable to find jetty.home");
         }
@@ -822,10 +825,6 @@ public abstract class BaseIntegrationTest
      * @throws ComponentInitializationException if the server cannot be initialized
      */
     public void startJettyServer() throws ComponentInitializationException {
-
-        serverCommands.add(0, "-Didp.home=" + System.getProperty("idp.home"));
-        serverCommands.add("-Djava.io.tmpdir=" + pathToJettyBase.resolve("tmp").toAbsolutePath());
-
         server = new JettyServerProcess();
         server.setServletContainerBasePath(pathToJettyBase);
         server.setServletContainerHomePath(pathToJettyHome);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list