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:57 UTC
[geode] branch develop updated (dca52c8 -> 461a53d)
This is an automated email from the ASF dual-hosted git repository.
klund pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.
from dca52c8 GEODE-1279: Rename several Bug*Test tests to have descriptive names (#1645)
new 888c7ab GEODE-4885: Change ClusterStartupRule to launch DUnit during setUp
new f39342d GEODE-4885: Fix ClientCQAuthDUnitTest by invoking getVM during setUp
new 461a53d GEODE-4885: Fix JMXMBeanDUnitTest by adding DistributedTestRule
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/geode/management/JMXMBeanDUnitTest.java | 31 +++++++++++++---------
.../geode/test/dunit/rules/ClusterStartupRule.java | 2 +-
.../geode/security/ClientCQAuthDUnitTest.java | 19 +++++++++----
3 files changed, 34 insertions(+), 18 deletions(-)
--
To stop receiving notification emails like this one, please contact
klund@apache.org.
[geode] 03/03: GEODE-4885: Fix JMXMBeanDUnitTest by adding
DistributedTestRule
Posted by kl...@apache.org.
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 461a53df3160fa3d237578b20f9ab7aa47eeb593
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Tue Mar 20 11:31:24 2018 -0700
GEODE-4885: Fix JMXMBeanDUnitTest by adding DistributedTestRule
---
.../apache/geode/management/JMXMBeanDUnitTest.java | 31 +++++++++++++---------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/geode-core/src/test/java/org/apache/geode/management/JMXMBeanDUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/JMXMBeanDUnitTest.java
index 1c2717e..31d2fe2 100644
--- a/geode-core/src/test/java/org/apache/geode/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/JMXMBeanDUnitTest.java
@@ -48,9 +48,9 @@ import javax.rmi.ssl.SslRMIClientSocketFactory;
import com.google.common.collect.Maps;
import org.junit.Before;
import org.junit.BeforeClass;
+import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;
import org.junit.rules.RuleChain;
@@ -58,6 +58,7 @@ import org.apache.geode.internal.AvailablePortHelper;
import org.apache.geode.internal.security.SecurableCommunicationChannel;
import org.apache.geode.test.dunit.rules.CleanupDUnitVMsRule;
import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.DistributedTestRule;
import org.apache.geode.test.junit.categories.DistributedTest;
import org.apache.geode.test.junit.rules.MBeanServerConnectionRule;
import org.apache.geode.util.test.TestUtil;
@@ -68,22 +69,29 @@ import org.apache.geode.util.test.TestUtil;
* ssl settings cleanly.
*/
@Category(DistributedTest.class)
-@SuppressWarnings({"serial", "unused"})
+@SuppressWarnings("serial")
public class JMXMBeanDUnitTest implements Serializable {
+ private static Properties legacySSLProperties;
+ private static Properties sslProperties;
+ private static Properties sslPropertiesWithMultiKey;
+ private static String singleKeystore;
+ private static String multiKeystore;
+ private static String multiKeyTruststore;
+
+ private int jmxPort;
+ private Properties locatorProperties;
+
+ @ClassRule
+ public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+
+ private transient CleanupDUnitVMsRule cleanupDUnitVMsRule = new CleanupDUnitVMsRule();
private ClusterStartupRule lsRule = new ClusterStartupRule();
private transient MBeanServerConnectionRule jmxConnector = new MBeanServerConnectionRule();
- private transient RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
- private transient CleanupDUnitVMsRule cleanupDUnitVMsRule = new CleanupDUnitVMsRule();
@Rule
- public transient RuleChain ruleChain = RuleChain.outerRule(cleanupDUnitVMsRule)
- .around(restoreSystemProperties).around(lsRule).around(jmxConnector);
-
- private int jmxPort;
- private Properties locatorProperties = null;
- private static Properties legacySSLProperties, sslProperties, sslPropertiesWithMultiKey;
- private static String singleKeystore, multiKeystore, multiKeyTruststore;
+ public transient RuleChain ruleChain =
+ RuleChain.outerRule(cleanupDUnitVMsRule).around(lsRule).around(jmxConnector);
@BeforeClass
public static void beforeClass() {
@@ -154,7 +162,6 @@ public class JMXMBeanDUnitTest implements Serializable {
remotelyValidateJmxConnection(false);
}
-
@Test
public void testJMXOverSSLWithMultiKey() throws Exception {
locatorProperties.putAll(Maps.fromProperties(sslPropertiesWithMultiKey));
--
To stop receiving notification emails like this one, please contact
klund@apache.org.
[geode] 02/03: GEODE-4885: Fix ClientCQAuthDUnitTest by invoking
getVM during setUp
Posted by kl...@apache.org.
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 f39342d4a52f900abd072b14e20bfcde05c25b77
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Mar 19 13:13:34 2018 -0700
GEODE-4885: Fix ClientCQAuthDUnitTest by invoking getVM during setUp
Fix ClientCQAuthDUnitTest usage of getVM so its invoked after
ClusterStartupRule launches DUnit
---
.../apache/geode/security/ClientCQAuthDUnitTest.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/geode-cq/src/test/java/org/apache/geode/security/ClientCQAuthDUnitTest.java b/geode-cq/src/test/java/org/apache/geode/security/ClientCQAuthDUnitTest.java
index 0b87c49..8041b81 100644
--- a/geode-cq/src/test/java/org/apache/geode/security/ClientCQAuthDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/security/ClientCQAuthDUnitTest.java
@@ -12,7 +12,6 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
-
package org.apache.geode.security;
import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
@@ -20,6 +19,7 @@ import static org.apache.geode.security.SecurityTestUtil.assertNotAuthorized;
import static org.apache.geode.security.SecurityTestUtil.createClientCache;
import static org.apache.geode.security.SecurityTestUtil.createProxyRegion;
+import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -42,18 +42,27 @@ import org.apache.geode.test.junit.rules.ServerStarterRule;
@Category({DistributedTest.class, SecurityTest.class})
public class ClientCQAuthDUnitTest {
+ private static final String REGION_NAME = "AuthRegion";
+
+ private VM client1;
+ private VM client2;
+ private VM client3;
+
@Rule
public ClusterStartupRule startupRule = new ClusterStartupRule();
- private static String REGION_NAME = "AuthRegion";
- private final VM client1 = startupRule.getVM(1);
- private final VM client2 = startupRule.getVM(2);
- private final VM client3 = startupRule.getVM(3);
@Rule
public ServerStarterRule server = new ServerStarterRule()
.withProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName())
.withRegion(RegionShortcut.REPLICATE, REGION_NAME);
+ @Before
+ public void setUp() {
+ client1 = startupRule.getVM(1);
+ client2 = startupRule.getVM(2);
+ client3 = startupRule.getVM(3);
+ }
+
@Test
public void verifyCQPermissions() {
String query = "select * from /AuthRegion";
--
To stop receiving notification emails like this one, please contact
klund@apache.org.
[geode] 01/03: GEODE-4885: Change ClusterStartupRule to launch
DUnit during setUp
Posted by kl...@apache.org.
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.