geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [12/13] incubator-geode git commit: GEODE-870: Adding GMSJoinLeaveTestHelper back after gemfire/geode merge
Date Mon, 29 Feb 2016 05:57:04 GMT
GEODE-870: Adding GMSJoinLeaveTestHelper back after gemfire/geode merge


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3879739a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3879739a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3879739a

Branch: refs/heads/develop
Commit: 3879739a5e4f4d2e2eabc6bbee21faecfc990d69
Parents: 21cd26d
Author: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Authored: Tue Feb 23 08:20:45 2016 +1100
Committer: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Committed: Mon Feb 29 16:47:29 2016 +1100

----------------------------------------------------------------------
 .../gms/membership/GMSJoinLeaveTestHelper.java  | 67 --------------------
 1 file changed, 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3879739a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
deleted file mode 100644
index 493c625..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
-
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
-import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
-
-public class GMSJoinLeaveTestHelper {
-
-  public static void becomeCoordinatorForTest(GMSJoinLeave gmsJoinLeave) {
-    synchronized (gmsJoinLeave.getViewInstallationLock()) {
-      gmsJoinLeave.becomeCoordinator();
-    }
-  }
-
-  public static boolean isViewCreator() {
-    GMSJoinLeave gmsJoinLeave = getGmsJoinLeave();
-    if (gmsJoinLeave != null) {
-      GMSJoinLeave.ViewCreator viewCreator = gmsJoinLeave.getViewCreator();
-      if (viewCreator != null && !viewCreator.isShutdown()) {
-        return true;
-      } else {
-        return false;
-      }
-    }
-    throw new RuntimeException("This should not have happened. There should be a JoinLeave
for every DS");
-  }
-
-  private static GMSJoinLeave getGmsJoinLeave() {
-    InternalDistributedSystem distributedSystem = getInternalDistributedSystem();
-    DM dm = distributedSystem.getDM();
-    GMSMembershipManager membershipManager = (GMSMembershipManager) dm.getMembershipManager();
-    Services services = membershipManager.getServices();
-    return (GMSJoinLeave) services.getJoinLeave();
-  }
-
-  public static Integer getViewId() {
-    return getGmsJoinLeave().getView().getViewId();
-  }
-
-  private static InternalDistributedSystem getInternalDistributedSystem() {
-    InternalDistributedSystem distributedSystem = InternalDistributedSystem.getAnyInstance();
-    if (distributedSystem == null) {
-      Locator locator = Locator.getLocator();
-      return (InternalDistributedSystem) locator.getDistributedSystem();
-    } else {
-      return distributedSystem;
-    }
-  }
-}


Mime
View raw message