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 2016/06/07 20:55:10 UTC
[55/62] [abbrv] incubator-geode git commit: Merge remote-tracking
branch 'origin/develop' into feature/GEODE-837
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
index 11d5779,10ebdaf..3c48fb9
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
@@@ -16,69 -16,41 +16,58 @@@
*/
package com.gemstone.gemfire.distributed.internal;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
+import java.net.InetAddress;
+import java.net.UnknownHostException;
- import java.util.Properties;
+import java.util.Set;
+
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
- import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedLockService;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Config;
-import com.gemstone.gemfire.internal.admin.*;
+import com.gemstone.gemfire.internal.admin.Alert;
+import com.gemstone.gemfire.internal.admin.AlertListener;
+import com.gemstone.gemfire.internal.admin.ApplicationVM;
+import com.gemstone.gemfire.internal.admin.DLockInfo;
+import com.gemstone.gemfire.internal.admin.EntryValueNode;
+import com.gemstone.gemfire.internal.admin.GemFireVM;
+import com.gemstone.gemfire.internal.admin.GfManagerAgent;
+import com.gemstone.gemfire.internal.admin.GfManagerAgentConfig;
+import com.gemstone.gemfire.internal.admin.GfManagerAgentFactory;
+import com.gemstone.gemfire.internal.admin.StatResource;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Set;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* This class tests the functionality of the {@linkplain com.gemstone.gemfire.internal.admin internal
* admin} API.
*/
-public class ConsoleDistributionManagerDUnitTest
- extends CacheTestCase implements AlertListener {
+@Category(DistributedTest.class)
- public class ConsoleDistributionManagerDUnitTest
- extends JUnit4CacheTestCase implements AlertListener {
++public class ConsoleDistributionManagerDUnitTest extends JUnit4CacheTestCase implements AlertListener {
protected GfManagerAgent agent = null;
private static boolean firstTime = true;
- public ConsoleDistributionManagerDUnitTest() {
- super();
- public ConsoleDistributionManagerDUnitTest(String name) {
- super(name);
-- }
--
--// private volatile Alert lastAlert = null;
--
public void alert(Alert alert) {
LogWriterUtils.getLogWriter().info("DEBUG: alert=" + alert);
--// this.lastAlert = alert;
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
index d36b99d,39a50b3..86e0fdc
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
@@@ -16,32 -16,9 +16,34 @@@
*/
package com.gemstone.gemfire.distributed.internal;
- import static org.junit.Assert.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.net.InetAddress;
++import java.net.UnknownHostException;
+import java.util.Properties;
+
+import org.apache.logging.log4j.Logger;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.admin.*;
-import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.admin.AdminDistributedSystem;
+import com.gemstone.gemfire.admin.AdminDistributedSystemFactory;
+import com.gemstone.gemfire.admin.Alert;
+import com.gemstone.gemfire.admin.AlertLevel;
+import com.gemstone.gemfire.admin.AlertListener;
+import com.gemstone.gemfire.admin.DistributedSystemConfig;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheListener;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.EntryEvent;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionEvent;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@@ -65,10 -41,9 +67,12 @@@ import com.gemstone.gemfire.test.junit.
* This class tests the functionality of the {@link
* DistributionManager} class.
*/
-public class DistributionManagerDUnitTest extends DistributedTestCase {
+@Category(DistributedTest.class)
+public class DistributionManagerDUnitTest extends JUnit4DistributedTestCase {
private static final Logger logger = LogService.getLogger();
--
++
++ public static DistributedSystem ds;
++
/**
* Clears the exceptionInThread flag in the given distribution
* manager.
@@@ -82,9 -61,9 +86,7 @@@
disconnectAllFromDS();
}
-- //////// Test Methods
--
-- protected static class ItsOkayForMyClassNotToBeFound
++ protected static class ItsOkayForMyClassNotToBeFound
extends SerialDistributionMessage {
public int getDSFID() {
@@@ -97,9 -76,8 +99,7 @@@
}
};
-- public static DistributedSystem ds;
--
+ @Test
public void testGetDistributionVMType() {
DM dm = getSystem().getDistributionManager();
InternalDistributedMember ipaddr = dm.getId();
@@@ -231,7 -206,7 +231,7 @@@
Thread.sleep(gracePeriod);
}
catch (InterruptedException e) {
-- fail("test was interrupted");
++ fail("test was interrupted", e);
}
vm0.invoke(connectDisconnect);
@@@ -239,8 -214,8 +239,8 @@@
!mgr.isSurpriseMember(mbr));
}
-- catch (java.net.UnknownHostException e) {
-- fail("unable to resolve localhost - test needs some attention");
++ catch (UnknownHostException e) {
++ fail("unable to resolve localhost - test needs some attention", e);
}
finally {
if (sys != null && sys.isConnected()) {
@@@ -358,7 -332,7 +358,7 @@@
Thread.sleep(15000);
}
catch (InterruptedException ie) {
-- fail("interrupted");
++ fail("interrupted", ie);
}
}
@Override
@@@ -517,9 -490,8 +517,8 @@@
/**
* test use of a bad bind-address for bug #32565
-- * @throws Exception
*/
+ @Test
public void testBadBindAddress() throws Exception {
disconnectAllFromDS();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
index af55232,bcc4041..ba16278
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
@@@ -16,12 -16,14 +16,14 @@@
*/
package com.gemstone.gemfire.distributed.internal;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.logging.LogService;
-import org.apache.logging.log4j.Logger;
-import util.TestException;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
+import org.apache.logging.log4j.Logger;
+
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.logging.LogService;
/**
* A little class for testing the local DistributionManager
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
index 5712c0a,c0aa6c5..cc99bad
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
@@@ -16,17 -16,6 +16,18 @@@
*/
package com.gemstone.gemfire.distributed.internal;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
index 76374e2,fb3c5a7..3a6060e
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
@@@ -16,46 -16,10 +16,45 @@@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
- import static org.mockito.Matchers.any;
- import static org.mockito.Matchers.isA;
++import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.*;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.commons.lang.SerializationException;
+import org.jgroups.Address;
+import org.jgroups.Event;
+import org.jgroups.JChannel;
+import org.jgroups.Message;
+import org.jgroups.conf.ClassConfigurator;
+import org.jgroups.protocols.UNICAST3;
+import org.jgroups.protocols.pbcast.NAKACK2;
+import org.jgroups.util.Digest;
+import org.jgroups.util.UUID;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.ForcedDisconnectException;
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.*;
+import com.gemstone.gemfire.distributed.internal.DM;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.DistributionMessage;
+import com.gemstone.gemfire.distributed.internal.DistributionStats;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.SerialAckedMessage;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.NetView;
import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
index 015f442,5430dea..21dfa7a
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
@@@ -16,15 -16,6 +16,16 @@@
*/
package com.gemstone.gemfire.distributed.internal.tcpserver;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.Locator;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java
index 5f3442f,df05a3d..e776e2a
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java
@@@ -16,17 -16,7 +16,16 @@@
*/
package com.gemstone.gemfire.disttx;
+import org.junit.experimental.categories.Category;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
import com.gemstone.gemfire.cache30.CacheMapTxnDUnitTest;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
index c16587e,a78216a..9dc6a96
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
@@@ -16,12 -16,6 +16,13 @@@
*/
package com.gemstone.gemfire.disttx;
- import static org.junit.Assert.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import static junit.framework.TestCase.*;
+
+import java.util.Properties;
+
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.CacheTransactionManager;
import com.gemstone.gemfire.cache.RegionShortcut;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
index 0c05fdd,76f7736..9d4623b
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
@@@ -16,50 -16,37 +16,43 @@@
*/
package com.gemstone.gemfire.disttx;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
- import static org.junit.Assert.*;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache30.TXOrderDUnitTest;
--
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+
import java.util.Properties;
++import org.junit.Ignore;
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
+import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache30.TXOrderDUnitTest;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Same tests as that of {@link TXOrderDUnitTest} after setting
* "distributed-transactions" property to true
*/
+@Category(DistributedTest.class)
public class DistTXOrderDUnitTest extends TXOrderDUnitTest {
- public DistTXOrderDUnitTest() {
- super();
- public DistTXOrderDUnitTest(String name) {
- super(name);
-- }
--
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
return props;
}
--
++
++ @Ignore("TODO: test is disabled for Dist TX")
@Override
+ @Test
public void testFarSideOrder() throws CacheException {
// [DISTTX] TODO test overridden intentionally and left blank as it fails
// fix this
}
--
++
++ @Ignore("TODO: test is disabled for Dist TX")
@Override
+ @Test
public void testInternalRegionNotExposed() {
// [DISTTX] TODO test overridden intentionally and left blank as it fails
// fix this
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
index 99a27cb,c0fbd8d..b8165d5
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
@@@ -16,35 -16,20 +16,22 @@@
*/
package com.gemstone.gemfire.disttx;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
- import static org.junit.Assert.*;
-
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import com.gemstone.gemfire.cache30.TXRestrictionsDUnitTest;
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+
import java.util.Properties;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache30.TXRestrictionsDUnitTest;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
- import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
-
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
/**
* Same tests as that of {@link TXRestrictionsDUnitTest} after setting
* "distributed-transactions" property to true
*/
+@Category(DistributedTest.class)
public class DistTXRestrictionsDUnitTest extends TXRestrictionsDUnitTest {
- public DistTXRestrictionsDUnitTest() {
- super();
- public DistTXRestrictionsDUnitTest(String name) {
- super(name);
-- }
--
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
index dc09e86,8aa5c51..32f6dae
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
@@@ -16,25 -16,14 +16,20 @@@
*/
package com.gemstone.gemfire.disttx;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
- import static org.junit.Assert.*;
-
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import com.gemstone.gemfire.internal.cache.TransactionsWithDeltaDUnitTest;
-import java.util.Properties;
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import java.util.Properties;
+
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
++import org.junit.experimental.categories.Category;
++
+import com.gemstone.gemfire.internal.cache.TransactionsWithDeltaDUnitTest;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
+@Category(DistributedTest.class)
public class DistTXWithDeltaDUnitTest extends TransactionsWithDeltaDUnitTest {
- public DistTXWithDeltaDUnitTest(String name) {
- super(name);
+ public DistTXWithDeltaDUnitTest() {
+ super();
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
index 4bd647c,3538e41..76d5603
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
@@@ -16,71 -16,33 +16,65 @@@
*/
package com.gemstone.gemfire.disttx;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
-import com.gemstone.gemfire.cache.*;
+import static org.junit.Assert.*;
+
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheTransactionManager;
+import com.gemstone.gemfire.cache.CommitConflictException;
+import com.gemstone.gemfire.cache.CommitIncompleteException;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.DiskStore;
+import com.gemstone.gemfire.cache.InterestPolicy;
+import com.gemstone.gemfire.cache.PartitionAttributesFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.SubscriptionAttributes;
import com.gemstone.gemfire.cache.server.CacheServer;
--import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
- import com.gemstone.gemfire.distributed.internal.ReplyException;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.AvailablePort;
- import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.BucketRegion;
++import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.internal.cache.DistTXState;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.internal.cache.TXManagerImpl;
- import com.gemstone.gemfire.internal.cache.TXState;
+import com.gemstone.gemfire.internal.cache.TXStateInterface;
+import com.gemstone.gemfire.internal.cache.TXStateProxyImpl;
import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
import com.gemstone.gemfire.internal.cache.execute.data.CustId;
import com.gemstone.gemfire.internal.cache.execute.data.Customer;
import com.gemstone.gemfire.internal.cache.execute.data.Order;
import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.VM;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Port of GemFireXD's corresponding test for distributed transactions
-- *
-- *
*/
@SuppressWarnings("deprecation")
-public class DistributedTransactionDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class DistributedTransactionDUnitTest extends JUnit4CacheTestCase {
++
final protected String CUSTOMER_PR = "customerPRRegion";
final protected String ORDER_PR = "orderPRRegion";
final protected String D_REFERENCE = "distrReference";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
index f205003,38c033f..362127e
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
@@@ -16,19 -16,16 +16,20 @@@
*/
package com.gemstone.gemfire.disttx;
-import com.gemstone.gemfire.internal.cache.execute.PRTransactionDUnitTest;
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++
import java.util.Properties;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.execute.PRTransactionDUnitTest;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
+@Category(DistributedTest.class)
public class PRDistTXDUnitTest extends PRTransactionDUnitTest {
- public PRDistTXDUnitTest(String name) {
- super(name);
- }
-
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
index 2bee9b0,5affa6a..880606c
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
@@@ -16,19 -16,19 +16,20 @@@
*/
package com.gemstone.gemfire.disttx;
-import com.gemstone.gemfire.internal.cache.execute.PRTransactionWithVersionsDUnitTest;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.execute.PRTransactionWithVersionsDUnitTest;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-public class PRDistTXWithVersionsDUnitTest extends
- PRTransactionWithVersionsDUnitTest {
+@Category(DistributedTest.class)
+public class PRDistTXWithVersionsDUnitTest extends PRTransactionWithVersionsDUnitTest {
- public PRDistTXWithVersionsDUnitTest(String name) {
- super(name);
- }
-
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
@@@ -36,33 -36,30 +37,39 @@@
return props;
}
- // [DISTTX] TODO test overridden and intentionally left blank as they fail.
- // Fix this
-
+ @Ignore("[DISTTX] TODO test overridden and intentionally left blank as they fail.")
+ @Override
+ @Test
public void testBasicPRTransactionRedundancy0() {
}
+ @Ignore("[DISTTX] TODO test overridden and intentionally left blank as they fail.")
+ @Override
+ @Test
public void testBasicPRTransactionRedundancy1() {
}
+ @Ignore("[DISTTX] TODO test overridden and intentionally left blank as they fail.")
+ @Override
+ @Test
public void testBasicPRTransactionRedundancy2() {
}
+ @Ignore("[DISTTX] TODO test overridden and intentionally left blank as they fail.")
+ @Override
+ @Test
public void testBasicPRTransactionNoDataRedundancy0() {
}
+ @Ignore("[DISTTX] TODO test overridden and intentionally left blank as they fail.")
+ @Override
+ @Test
public void testBasicPRTransactionNoDataRedundancy1() {
}
+ @Ignore("[DISTTX] TODO test overridden and intentionally left blank as they fail.")
+ @Override
+ @Test
public void testBasicPRTransactionNoDataRedundancy2() {
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
index 2d3ec7c,4267292..5f28a2e
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
@@@ -16,41 -16,27 +16,27 @@@
*/
package com.gemstone.gemfire.disttx;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
- import static org.junit.Assert.*;
-
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import com.gemstone.gemfire.internal.cache.partitioned.PersistentPartitionedRegionWithTransactionDUnitTest;
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+
import java.util.Properties;
- import org.junit.Ignore;
++import org.junit.experimental.categories.Category;
+
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.partitioned.PersistentPartitionedRegionWithTransactionDUnitTest;
-
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Same tests as that of
* {@link PersistentPartitionedRegionWithTransactionDUnitTest} after setting
* "distributed-transactions" property to true
*/
-public class PersistentPartitionedRegionWithDistTXDUnitTest extends
- PersistentPartitionedRegionWithTransactionDUnitTest {
+@Category(DistributedTest.class)
- public class PersistentPartitionedRegionWithDistTXDUnitTest extends
- PersistentPartitionedRegionWithTransactionDUnitTest {
++public class PersistentPartitionedRegionWithDistTXDUnitTest extends PersistentPartitionedRegionWithTransactionDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
return props;
}
--
- public PersistentPartitionedRegionWithDistTXDUnitTest() {
- super();
- public PersistentPartitionedRegionWithDistTXDUnitTest(String name) {
- super(name);
-- }
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java
index dbcd795,157fe7e..68b81bf
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java
@@@ -16,16 -16,19 +16,17 @@@
*/
package com.gemstone.gemfire.internal;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultSender;
-import com.gemstone.gemfire.internal.cache.InternalCache;
-import com.gemstone.gemfire.internal.cache.execute.FunctionContextImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMXBean;
@@@ -39,19 -42,8 +40,18 @@@ import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
-import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.ResultSender;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.InternalCache;
+import com.gemstone.gemfire.internal.cache.execute.FunctionContextImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
/**
* TODO: Need to fix this testDeclarableFunctionsWithParms and testClassOnClasspath on Windows:
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
index a52a80c,7576756..4c24a61
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
@@@ -16,24 -16,20 +16,17 @@@
*/
package com.gemstone.gemfire.internal;
- import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
-import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.DistributedSystemConfigProperties;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
--import org.junit.Test;
--
-import java.io.*;
+import static org.junit.Assert.*;
+
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
import java.nio.channels.FileLock;
import java.util.Arrays;
import java.util.Comparator;
@@@ -45,35 -41,20 +38,34 @@@ import java.util.concurrent.CyclicBarri
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.junit.Test;
++import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.execute.Execution;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.ResultCollector;
- import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.DistributedSystem;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
++import com.gemstone.gemfire.distributed.DistributedSystemConfigProperties;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
/**
* Unit tests for the JarDeployer class
*
- * @since 7.0
+ * @since GemFire 7.0
*/
-public class JarDeployerDUnitTest extends CacheTestCase {
- private static final long serialVersionUID = 1L;
+@Category(DistributedTest.class)
++@SuppressWarnings("serial")
+public class JarDeployerDUnitTest extends JUnit4CacheTestCase {
- private static final long serialVersionUID = 1L;
++
static FileLock savedFileLock = null;
private final ClassBuilder classBuilder = new ClassBuilder();
- public JarDeployerDUnitTest() {
- super();
- public JarDeployerDUnitTest(String name) {
- super(name);
-- }
--
@Override
public final void preTearDownCacheTestCase() throws Exception {
JarDeployer jarDeployer = new JarDeployer();
@@@ -169,8 -150,8 +161,7 @@@
}
}
- @SuppressWarnings("serial")
@Test
- @SuppressWarnings("serial")
public void testDeployExclusiveLock() throws IOException, ClassNotFoundException {
final JarDeployer jarDeployer = new JarDeployer();
final File currentDir = new File(".").getAbsoluteFile();
@@@ -226,8 -207,8 +217,7 @@@
});
}
- @SuppressWarnings("serial")
@Test
- @SuppressWarnings("serial")
public void testDeploySharedLock() throws IOException, ClassNotFoundException {
final JarDeployer jarDeployer = new JarDeployer();
final File currentDir = new File(".").getAbsoluteFile();
@@@ -291,8 -272,8 +281,7 @@@
});
}
- @SuppressWarnings("serial")
@Test
- @SuppressWarnings("serial")
public void testUndeploySharedLock() throws IOException, ClassNotFoundException {
final JarDeployer jarDeployer = new JarDeployer();
final File currentDir = new File(".").getAbsoluteFile();
@@@ -343,8 -324,8 +332,7 @@@
});
}
- @SuppressWarnings("serial")
@Test
- @SuppressWarnings("serial")
public void testDeployUpdateByAnotherVM() throws IOException, ClassNotFoundException {
final JarDeployer jarDeployer = new JarDeployer();
final File currentDir = new File(".").getAbsoluteFile();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
index 35d1f25,b507156..4c50ab0
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
@@@ -16,30 -16,8 +16,25 @@@
*/
package com.gemstone.gemfire.internal;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.cache30.CacheTestCase;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CopyOnWriteArrayList;
+
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DiskStoreFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
- import com.gemstone.gemfire.cache30.CacheTestCase;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
import com.gemstone.gemfire.pdx.PdxInstance;
import com.gemstone.gemfire.pdx.PdxReader;
@@@ -51,16 -29,23 +46,15 @@@ import com.gemstone.gemfire.test.dunit.
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+@Category(DistributedTest.class)
- public class PdxDeleteFieldDUnitTest extends JUnit4CacheTestCase{
++public class PdxDeleteFieldDUnitTest extends JUnit4CacheTestCase {
+
-public class PdxDeleteFieldDUnitTest extends CacheTestCase{
final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
- public PdxDeleteFieldDUnitTest() {
- super();
- public PdxDeleteFieldDUnitTest(String name) {
- super(name);
-- }
--
+ @Test
public void testPdxDeleteFieldVersioning() throws Exception {
final String DS_NAME = "PdxDeleteFieldDUnitTestDiskStore";
final String DS_NAME2 = "PdxDeleteFieldDUnitTestDiskStore2";
@@@ -195,8 -180,8 +189,10 @@@
}
public static class PdxValue implements PdxSerializable {
++
public int value;
public long fieldToDelete = -1L;
++
public PdxValue() {} // for deserialization
public PdxValue(int v, long lv) {
this.value = v;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
index 94173aa,f85f750..345cefb
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
@@@ -16,30 -16,8 +16,25 @@@
*/
package com.gemstone.gemfire.internal;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.cache30.CacheTestCase;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CopyOnWriteArrayList;
+
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DiskStoreFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
- import com.gemstone.gemfire.cache30.CacheTestCase;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
import com.gemstone.gemfire.pdx.PdxInstance;
import com.gemstone.gemfire.pdx.PdxReader;
@@@ -52,16 -30,23 +47,15 @@@ import com.gemstone.gemfire.test.dunit.
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+@Category(DistributedTest.class)
+public class PdxRenameDUnitTest extends JUnit4CacheTestCase{
+
-public class PdxRenameDUnitTest extends CacheTestCase{
final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
- public PdxRenameDUnitTest() {
- super();
- public PdxRenameDUnitTest(String name) {
- super(name);
-- }
--
+ @Test
public void testPdxRenameVersioning() throws Exception {
final String DS_NAME = "PdxRenameDUnitTestDiskStore";
final String DS_NAME2 = "PdxRenameDUnitTestDiskStore2";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
index d862392,cb9135e..62b4adf
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
@@@ -16,28 -16,30 +16,29 @@@
*/
package com.gemstone.gemfire.internal;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import junit.framework.AssertionFailedError;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
++import com.gemstone.gemfire.test.junit.categories.SecurityTest;
/**
* Test that DistributionConfigImpl handles SSL options correctly.
- *
*/
--@Category(IntegrationTest.class)
++@Category({ IntegrationTest.class, SecurityTest.class })
public class SSLConfigJUnitTest {
-- private static final Properties SSL_PROPS_MAP = new Properties();
-- private static final Properties CLUSTER_SSL_PROPS_MAP = new Properties();
-- private static final Properties CLUSTER_SSL_PROPS_SUBSET_MAP = new Properties();
++ private static final Properties SSL_PROPS_MAP = new Properties();
++ private static final Properties CLUSTER_SSL_PROPS_MAP = new Properties();
++ private static final Properties CLUSTER_SSL_PROPS_SUBSET_MAP = new Properties();
private static final Properties JMX_SSL_PROPS_MAP = new Properties();
private static final Properties JMX_SSL_PROPS_SUBSET_MAP = new Properties();
private static final Properties SERVER_SSL_PROPS_MAP = new Properties();
@@@ -108,7 -113,7 +109,7 @@@
try {
new DistributionConfigImpl( props );
} catch ( IllegalArgumentException e ) {
-- if (! e.toString().matches( ".*Could not set \"ssl-enabled.*" ) ) {
++ if (! e.toString().matches( ".*Could not set \"ssl-enabled.*" ) ) { // TODO: what if this isn't thrown at all?? Is it expected?
throw new Exception( "did not get expected exception, got this instead...", e );
}
}
@@@ -670,17 -679,17 +671,17 @@@
boolean cacheServerSslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, cacheServerSslciphers);
- gemFireProps.put(DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
- gemFireProps.putAll(getGfSecurityPropertiesforCS(false));
+ gemFireProps.putAll(getGfSecurityPropertiesForCS(false));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@@ -713,17 -722,17 +714,17 @@@
boolean gatewaySslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewaySslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewaySslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewaySslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewaySslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewaySslRequireAuth));
- gemFireProps.putAll(getGfSecurityPropertiesforGateway(false));
+ gemFireProps.putAll(getGfSecurityPropertiesForGateway(false));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@@ -736,11 -745,12 +737,11 @@@
isEqual( config.getGatewaySSLCiphers(), gatewaySslciphers );
isEqual( config.getGatewaySSLRequireAuthentication(), gatewaySslRequireAuth );
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-keystore") , config.getGatewaySSLKeyStore());
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-keystore-type"), config.getGatewaySSLKeyStoreType());
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-keystore-password"), config.getGatewaySSLKeyStorePassword());
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-truststore"), config.getGatewaySSLTrustStore());
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-truststore-password"),config.getGatewaySSLTrustStorePassword());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_KEYSTORE_TYPE), config.getGatewaySSLKeyStoreType());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_KEYSTORE_PASSWORD), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_TRUSTSTORE_PASSWORD), config.getGatewaySSLTrustStorePassword());
-
}
@Test
@@@ -779,19 -789,20 +780,19 @@@
isEqual( config.getJmxManagerSSLCiphers(), jmxManagerSslciphers );
isEqual( config.getJmxManagerSSLRequireAuthentication(), jmxManagerSslRequireAuth );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( JMX_SSL_PROPS_SUBSET_MAP.get("jmx-manager-ssl-keystore") , config.getJmxManagerSSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getJmxManagerSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getJmxManagerSSLKeyStorePassword());
- isEqual( JMX_SSL_PROPS_SUBSET_MAP.get("jmx-manager-ssl-truststore"), config.getJmxManagerSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getJmxManagerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(JMX_SSL_PROPS_SUBSET_MAP.get(JMX_MANAGER_SSL_KEYSTORE), config.getJmxManagerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getJmxManagerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getJmxManagerSSLKeyStorePassword());
+ isEqual(JMX_SSL_PROPS_SUBSET_MAP.get(JMX_MANAGER_SSL_TRUSTSTORE), config.getJmxManagerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getJmxManagerSSLTrustStorePassword());
}
-
@Test
public void testPartialCustomizedCacheServerSslConfig() throws Exception {
boolean sslenabled = false;
@@@ -805,17 -816,17 +806,17 @@@
boolean cacheServerSslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, cacheServerSslciphers);
- gemFireProps.put(DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
- gemFireProps.putAll(getGfSecurityPropertiesforCS(true));
+ gemFireProps.putAll(getGfSecurityPropertiesForCS(true));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@@ -854,17 -865,17 +855,17 @@@
boolean gatewaySslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewaySslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewaySslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewaySslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewaySslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewaySslRequireAuth));
- gemFireProps.putAll(getGfSecurityPropertiesforGateway(true));
+ gemFireProps.putAll(getGfSecurityPropertiesForGateway(true));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@@ -876,18 -887,19 +877,18 @@@
isEqual( config.getGatewaySSLProtocols(), gatewaySslprotocols );
isEqual( config.getGatewaySSLCiphers(), gatewaySslciphers );
isEqual( config.getGatewaySSLRequireAuthentication(), gatewaySslRequireAuth );
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( GATEWAY_PROPS_SUBSET_MAP.get("gateway-ssl-keystore") , config.getGatewaySSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getGatewaySSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getGatewaySSLKeyStorePassword());
- isEqual( GATEWAY_PROPS_SUBSET_MAP.get("gateway-ssl-truststore"), config.getGatewaySSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getGatewaySSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getGatewaySSLTrustStorePassword());
-
}
@Test
@@@ -903,13 -915,13 +904,13 @@@
boolean cacheServerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(MCAST_PORT, "0");
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.putAll(getGfSecurityPropertiesforCS(true));
+ gemFireProps.putAll(getGfSecurityPropertiesForCS(true));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@@ -929,17 -941,18 +930,17 @@@
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore") , config.getServerSSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getServerSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getServerSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getServerSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getServerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getServerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getServerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getServerSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getServerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getServerSSLTrustStorePassword());
-
}
@Test
@@@ -955,18 -968,18 +956,18 @@@
boolean cacheServerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(MCAST_PORT, "0");
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, cacheServerSslciphers);
- gemFireProps.put(DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
- gemFireProps.putAll(getGfSecurityPropertiesforCS(true));
+ gemFireProps.putAll(getGfSecurityPropertiesForCS(true));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@@ -1012,13 -1025,13 +1013,13 @@@
boolean gatewayServerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(MCAST_PORT, "0");
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.putAll(getGfSecurityPropertiesforGateway(true));
+ gemFireProps.putAll(getGfSecurityPropertiesForGateway(true));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@@ -1038,17 -1051,18 +1039,17 @@@
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore") , config.getGatewaySSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getGatewaySSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getGatewaySSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getGatewaySSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getGatewaySSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getGatewaySSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getGatewaySSLTrustStorePassword());
-
}
@Test
@@@ -1064,18 -1078,18 +1065,18 @@@
boolean gatewayServerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(MCAST_PORT, "0");
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewayServerSslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewayServerSslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewayServerSslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewayServerSslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewayServerSslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewayServerSslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewayServerSslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewayServerSslRequireAuth));
- gemFireProps.putAll(getGfSecurityPropertiesforGateway(true));
+ gemFireProps.putAll(getGfSecurityPropertiesForGateway(true));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@@ -1090,17 -1104,18 +1091,17 @@@
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( GATEWAY_PROPS_SUBSET_MAP.get("gateway-ssl-keystore") , config.getGatewaySSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getGatewaySSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getGatewaySSLKeyStorePassword());
- isEqual( GATEWAY_PROPS_SUBSET_MAP.get("gateway-ssl-truststore"), config.getGatewaySSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getGatewaySSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getGatewaySSLTrustStorePassword());
-
}
@Test
@@@ -1142,17 -1157,18 +1143,17 @@@
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore") , config.getJmxManagerSSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getJmxManagerSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getJmxManagerSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getJmxManagerSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getJmxManagerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getJmxManagerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getJmxManagerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getJmxManagerSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getJmxManagerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getJmxManagerSSLTrustStorePassword());
-
}
private static Properties getGfSecurityPropertiesSSL() {