You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2018/03/20 19:21:58 UTC

[geode] 01/03: GEODE-4885: Change ClusterStartupRule to launch DUnit during setUp

This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 888c7abf835b9fcad0b2224d16c8c70a231a6987
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Mar 19 09:43:27 2018 -0700

    GEODE-4885: Change ClusterStartupRule to launch DUnit during setUp
    
    Prevent ClusterStartupRule from launching DUnit during construction.
    Tests that have a static ClusterStartupRule are class-loaded even
    during test runs for other JUnit categories.
    
    * launch DUnit in ClusterStartupRule before instead of its constructor
---
 .../test/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java
index 31cd483..cbe1306 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java
@@ -95,7 +95,6 @@ public class ClusterStartupRule extends ExternalResource implements Serializable
 
   public ClusterStartupRule(final int vmCount) {
     this.vmCount = vmCount;
-    DUnitLauncher.launchIfNeeded();
   }
 
   public static ClientCache getClientCache() {
@@ -112,6 +111,7 @@ public class ClusterStartupRule extends ExternalResource implements Serializable
 
   @Override
   protected void before() throws Throwable {
+    DUnitLauncher.launchIfNeeded();
     for (int i = 0; i < vmCount; i++) {
       Host.getHost(0).getVM(i);
     }

-- 
To stop receiving notification emails like this one, please contact
klund@apache.org.