incubator-geode git commit: Add snapshot (export/import) test
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing 49bea47c5 -> 905003c71 Add snapshot (export/import) test Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/905003c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/905003c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/905003c7 Branch: refs/heads/feature/e2e-testing Commit: 905003c71c45e8a6bcb240be0be4ecc6dbb6f90d Parents: 49bea47 Author: Jens DeppeAuthored: Thu Oct 13 08:41:13 2016 -0700 Committer: Jens Deppe Committed: Thu Oct 13 08:41:13 2016 -0700 -- .../apache/geode/e2e/CopyingCacheListener.java | 31 +++ .../geode/e2e/FnGetPrimaryBucketSize.java | 50 +++ .../test/java/org/apache/geode/e2e/GetPut.java | 33 --- .../java/org/apache/geode/e2e/GetPutRunner.java | 7 ++ .../java/org/apache/geode/e2e/GetPutSteps.java | 53 --- .../org/apache/geode/e2e/SnapshotRunner.java| 7 ++ .../java/org/apache/geode/e2e/StoryRunner.java | 14 ++- .../test/java/org/apache/geode/e2e/Utils.java | 92 .../geode/e2e/container/DockerCluster.java | 20 +++-- .../org/apache/geode/e2e/get_put.story | 3 +- .../org/apache/geode/e2e/snapshot.story | 13 +++ 11 files changed, 269 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/905003c7/geode-core/src/test/java/org/apache/geode/e2e/CopyingCacheListener.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/CopyingCacheListener.java b/geode-core/src/test/java/org/apache/geode/e2e/CopyingCacheListener.java new file mode 100644 index 000..e801bb8 --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/e2e/CopyingCacheListener.java @@ -0,0 +1,31 @@ +package org.apache.geode.e2e; + +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.CacheFactory; +import org.apache.geode.cache.EntryEvent; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.util.CacheListenerAdapter; + +public class CopyingCacheListener extends CacheListenerAdapter { + + private Cache cache; + + public void afterCreate(EntryEvent event) { +Region r = getDstRegion(event); +r.put(event.getKey(), event.getNewValue()); + } + + + private Region getDstRegion(EntryEvent e) { +String srcRegion = e.getRegion().getName(); +return getCache().getRegion(srcRegion + "-copy"); + } + + private synchronized Cache getCache() { +if (cache == null) { + cache = CacheFactory.getAnyInstance(); +} + +return cache; + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/905003c7/geode-core/src/test/java/org/apache/geode/e2e/FnGetPrimaryBucketSize.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/FnGetPrimaryBucketSize.java b/geode-core/src/test/java/org/apache/geode/e2e/FnGetPrimaryBucketSize.java new file mode 100644 index 000..56895ae --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/e2e/FnGetPrimaryBucketSize.java @@ -0,0 +1,50 @@ +package org.apache.geode.e2e; + +import java.util.Properties; + +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.CacheFactory; +import org.apache.geode.cache.Declarable; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.execute.Function; +import org.apache.geode.cache.execute.FunctionContext; +import org.apache.geode.cache.execute.ResultSender; +import org.apache.geode.cache.partition.PartitionRegionHelper; + +public class FnGetPrimaryBucketSize implements Function, Declarable { + + @Override + public boolean hasResult() { +return true; + } + + @Override + public void execute(final FunctionContext context) { +String args = (String) context.getArguments(); + +Cache cache = CacheFactory.getAnyInstance(); +Region region = PartitionRegionHelper.getLocalPrimaryData(cache.getRegion(args)); +ResultSender rs = context.getResultSender(); +rs.lastResult(region.size()); + } + + @Override + public String getId() { +return "region-size"; + } + + @Override + public boolean optimizeForWrite() { +return true; + } + + @Override + public boolean isHA() { +return false; + } + + @Override + public void init(final Properties props) { +// Empty + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/905003c7/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java
incubator-geode git commit: Remove cluster start speedup
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing 9c4ced8ab -> 49bea47c5 Remove cluster start speedup Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/49bea47c Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/49bea47c Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/49bea47c Branch: refs/heads/feature/e2e-testing Commit: 49bea47c54c374b98a85e8b1ef3238690bf8386c Parents: 9c4ced8 Author: Jens DeppeAuthored: Tue Oct 11 14:56:39 2016 -0700 Committer: Jens Deppe Committed: Tue Oct 11 14:56:39 2016 -0700 -- .../test/java/org/apache/geode/e2e/container/DockerCluster.java| 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49bea47c/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java b/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java index 2582a4e..fde5060 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java @@ -129,7 +129,6 @@ public class DockerCluster { "/tmp/work/bin/gfsh", "start locator", "--name=" + memberName, -"--J=-Dgemfire.enable-cluster-configuration=false", "--J=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" }; @@ -168,7 +167,6 @@ public class DockerCluster { "--locators=" + locatorAddress, "--server-port=" + serverPort, "--hostname-for-clients=localhost", -//"--J=-Dgemfire.locator-wait-time=30", "--J=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" };
incubator-geode git commit: Make hostname, member name and container name consistent
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing e4313d2e9 -> 9c4ced8ab Make hostname, member name and container name consistent Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9c4ced8a Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9c4ced8a Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9c4ced8a Branch: refs/heads/feature/e2e-testing Commit: 9c4ced8ab4f81344ef62962a009029b50b046a97 Parents: e4313d2 Author: Jens DeppeAuthored: Tue Oct 11 14:37:05 2016 -0700 Committer: Jens Deppe Committed: Tue Oct 11 14:38:08 2016 -0700 -- .../java/org/apache/geode/e2e/DockerTest.java | 2 +- .../java/org/apache/geode/e2e/GetPutSteps.java | 40 ++-- .../geode/e2e/container/DockerCluster.java | 25 +++- .../org/apache/geode/e2e/get_put.story | 2 +- 4 files changed, 36 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9c4ced8a/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java b/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java index 13d1807..3587456 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java @@ -32,7 +32,7 @@ public class DockerTest { @Test public void testInvalidGfshCommandReturnsNonZero() throws Exception { -String id = cluster.startContainer(); +String id = cluster.startContainer("test-host-1"); int r = cluster.execCommand(id, false, null, new String[] { "/tmp/work/bin/gfsh", "startx" }); assertEquals(1, r); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9c4ced8a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java index e07ee34..a457dcf 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java @@ -1,12 +1,8 @@ package org.apache.geode.e2e; -import static junit.framework.TestCase.assertNotNull; import static org.junit.Assert.assertEquals; import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.List; import com.spotify.docker.client.exceptions.DockerException; @@ -88,6 +84,25 @@ public class GetPutSteps { } } + @Given("class{es|} $fnName {is|are} deployed") + public void deployClasses(String fnClasses) throws Exception { +for (String fnClass : fnClasses.split(",")) { + String jar = cluster.injectScratchFile(Utils.getJarForClassName(fnClass)); + cluster.gfshCommand("deploy --jar=" + jar); +} + } + + @When("I call function with id $fnId on region $regionName with argument $arg it returns $returns") + public void testRegionBucketSizeWithFunction(String fnId, String regionName, String arg, int returns) { +ClientCache cache = getClientCache(); +Region region = cache.getRegion(regionName); +Execution exe = FunctionService.onServers(region.getRegionService()); +ResultCollector rs = exe.withArgs(regionName).execute(fnId); +List results = (List) rs.getResult(); + +assertEquals(returns, results.stream().mapToInt(i -> i.intValue()).sum()); + } + private ClientCache getClientCache() { ClientCache cache; try { @@ -105,22 +120,5 @@ public class GetPutSteps { return cache; } - @Given("function $fnName is deployed") - public void deployFunction(String fnClass) throws Exception { -String jar = cluster.injectScratchFile(Utils.getJarForClassName(fnClass)); -cluster.gfshCommand("deploy --jar=" + jar); - } - - @When("I call function with id $fnId on region $regionName with argument $arg it returns $returns") - public void foo(String fnId, String regionName, String arg, int returns) { -ClientCache cache = getClientCache(); -Region region = cache.getRegion(regionName); -Execution exe = FunctionService.onServers(region.getRegionService()); -ResultCollector rs = exe.withArgs(regionName).execute(fnId); -List results = (List) rs.getResult(); - -assertEquals(returns, results.stream().mapToInt(i -> i.intValue()).sum()); - } - } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9c4ced8a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java
incubator-geode git commit: Remove index from container start - now just auto-incremented
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing aa9b675fb -> e4313d2e9 Remove index from container start - now just auto-incremented Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e4313d2e Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e4313d2e Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e4313d2e Branch: refs/heads/feature/e2e-testing Commit: e4313d2e96cbdfc9b1b82aed15f4f6b1a70384c2 Parents: aa9b675 Author: Jens DeppeAuthored: Tue Oct 11 14:03:29 2016 -0700 Committer: Jens Deppe Committed: Tue Oct 11 14:03:29 2016 -0700 -- .../java/org/apache/geode/e2e/DockerTest.java | 2 +- .../apache/geode/e2e/container/DockerCluster.java | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e4313d2e/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java b/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java index d8581f4..13d1807 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java @@ -32,7 +32,7 @@ public class DockerTest { @Test public void testInvalidGfshCommandReturnsNonZero() throws Exception { -String id = cluster.startContainer(0); +String id = cluster.startContainer(); int r = cluster.execCommand(id, false, null, new String[] { "/tmp/work/bin/gfsh", "startx" }); assertEquals(1, r); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e4313d2e/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java b/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java index f1cd4e9..3ccc343 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java @@ -32,10 +32,10 @@ public class DockerCluster { private int serverCount; private String name; private List nodeIds; - private String locatorHost; private int locatorPort; private final String geodeHome; private final String scratchDir; + private int containerCount = 0; private static final String SCRATCH_DIR_BASENAME = "scratch"; @@ -88,13 +88,13 @@ public class DockerCluster { startServers(); } - public String startContainer(int index) throws DockerException, InterruptedException { -return startContainer(index, new HashMap<>()); + public String startContainer() throws DockerException, InterruptedException { +return startContainer(new HashMap<>()); } - public String startContainer(int index, Map portBindings) throws DockerException, InterruptedException { + public String startContainer(Map portBindings) throws DockerException, InterruptedException { String vol = String.format("%s:/tmp/work", geodeHome); -String hostname = String.format("%s-%d", name, index); +String hostname = String.format("%s-%d", name, containerCount++); HostConfig hostConfig = HostConfig. builder(). @@ -113,7 +113,7 @@ public class DockerCluster { ContainerCreation creation = docker.createContainer(config); String id = creation.id(); -//docker.renameContainer(id, hostname); +docker.renameContainer(id, hostname); docker.startContainer(id); docker.inspectContainer(id); @@ -140,7 +140,7 @@ public class DockerCluster { debugBinding.add(PortBinding.of("HostPort", (5005 + i) + "")); ports.put("5005/tcp", debugBinding); - String id = startContainer(i, ports); + String id = startContainer(ports); execCommand(id, true, null, command); while (gfshCommand(null, null) != 0) { @@ -176,7 +176,7 @@ public class DockerCluster { debugBinding.add(PortBinding.of("HostPort", (5005 + i + locatorCount) + "")); ports.put("5005/tcp", debugBinding); - String id = startContainer(i, ports); + String id = startContainer(ports); execCommand(id, true, null, command); } @@ -272,7 +272,7 @@ public class DockerCluster { } public String getLocatorHost() { -return locatorHost; +return "localhost"; } public int getLocatorPort() {
incubator-geode git commit: Function deployment test
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing 6d097230a -> aa9b675fb Function deployment test Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/aa9b675f Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/aa9b675f Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/aa9b675f Branch: refs/heads/feature/e2e-testing Commit: aa9b675fb312e2e515586c62dd277c1d206c01d3 Parents: 6d09723 Author: Jens DeppeAuthored: Tue Oct 11 13:50:49 2016 -0700 Committer: Jens Deppe Committed: Tue Oct 11 13:50:49 2016 -0700 -- .../java/org/apache/geode/e2e/GetPutSteps.java | 30 +++- .../geode/e2e/container/DockerCluster.java | 48 +--- .../org/apache/geode/e2e/get_put.story | 3 ++ 3 files changed, 73 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aa9b675f/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java index 115dd69..e07ee34 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java @@ -1,13 +1,23 @@ package org.apache.geode.e2e; +import static junit.framework.TestCase.assertNotNull; import static org.junit.Assert.assertEquals; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; + import com.spotify.docker.client.exceptions.DockerException; import org.apache.geode.cache.CacheClosedException; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientCache; import org.apache.geode.cache.client.ClientCacheFactory; import org.apache.geode.cache.client.ClientRegionShortcut; +import org.apache.geode.cache.execute.Execution; +import org.apache.geode.cache.execute.FunctionService; +import org.apache.geode.cache.execute.ResultCollector; import org.apache.geode.e2e.container.DockerCluster; import org.jbehave.core.annotations.AfterScenario; import org.jbehave.core.annotations.BeforeScenario; @@ -27,7 +37,7 @@ public class GetPutSteps { } @BeforeScenario - public void beforeScenario() { + public void beforeScenario() throws IOException { cluster = new DockerCluster("test-cluster"); } @@ -94,5 +104,23 @@ public class GetPutSteps { return cache; } + + @Given("function $fnName is deployed") + public void deployFunction(String fnClass) throws Exception { +String jar = cluster.injectScratchFile(Utils.getJarForClassName(fnClass)); +cluster.gfshCommand("deploy --jar=" + jar); + } + + @When("I call function with id $fnId on region $regionName with argument $arg it returns $returns") + public void foo(String fnId, String regionName, String arg, int returns) { +ClientCache cache = getClientCache(); +Region region = cache.getRegion(regionName); +Execution exe = FunctionService.onServers(region.getRegionService()); +ResultCollector rs = exe.withArgs(regionName).execute(fnId); +List results = (List) rs.getResult(); + +assertEquals(returns, results.stream().mapToInt(i -> i.intValue()).sum()); + } + } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aa9b675f/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java b/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java index 96dae81..f1cd4e9 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java @@ -2,6 +2,11 @@ package org.apache.geode.e2e.container; import static com.google.common.base.Charsets.*; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -29,8 +34,21 @@ public class DockerCluster { private List nodeIds; private String locatorHost; private int locatorPort; + private final String geodeHome; + private final String scratchDir; + + private static final String SCRATCH_DIR_BASENAME = "scratch"; + + public DockerCluster(String name) throws IOException { +geodeHome = System.getenv("GEODE_HOME"); +if (geodeHome == null) { + throw new IllegalStateException("GEODE_HOME
incubator-geode git commit: Fix failing test
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing 0ff26e83d -> 6d097230a Fix failing test Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6d097230 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6d097230 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6d097230 Branch: refs/heads/feature/e2e-testing Commit: 6d097230a003ce43418ee2ad6799c3ddaa481f33 Parents: 0ff26e8 Author: Jens DeppeAuthored: Mon Oct 10 13:03:05 2016 -0700 Committer: Jens Deppe Committed: Mon Oct 10 13:03:05 2016 -0700 -- geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java | 2 +- geode-core/src/test/resources/org/apache/geode/e2e/get_put.story | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6d097230/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java index b6242d3..115dd69 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java @@ -36,7 +36,7 @@ public class GetPutSteps { cluster.stop(); } - @Given("cluster is started with $locators locators and $servers servers") + @Given("cluster is started with $locators locator{s|} and $servers servers") public void startCluster(int locatorCount, int serverCount) throws Exception { cluster.setLocatorCount(locatorCount); cluster.setServerCount(serverCount); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6d097230/geode-core/src/test/resources/org/apache/geode/e2e/get_put.story -- diff --git a/geode-core/src/test/resources/org/apache/geode/e2e/get_put.story b/geode-core/src/test/resources/org/apache/geode/e2e/get_put.story index 44d5062..9a451fc 100644 --- a/geode-core/src/test/resources/org/apache/geode/e2e/get_put.story +++ b/geode-core/src/test/resources/org/apache/geode/e2e/get_put.story @@ -1,11 +1,11 @@ Scenario: gfsh can start and manage a cluster -Given cluster is started with 1 locators and 3 servers +Given cluster is started with 1 locator and 3 servers Given region FOO is created as REPLICATE When I put 100 entries into region FOO Then I can get 100 entries from region FOO -Given region BAR is created as PARTITION with redundancy 1 +Given region BAR is created as PARTITION_REDUNDANT with redundancy 1 When I put 100 entries into region BAR Then I can get 100 entries from region BAR
[2/2] incubator-geode git commit: Add priority to Jbehave steps
Add priority to Jbehave steps Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0ff26e83 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0ff26e83 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0ff26e83 Branch: refs/heads/feature/e2e-testing Commit: 0ff26e83d1f66fe0181d5bdf4005b5c041796a64 Parents: 946ff2c Author: Jens DeppeAuthored: Mon Oct 10 07:32:48 2016 -0700 Committer: Jens Deppe Committed: Mon Oct 10 07:32:48 2016 -0700 -- .../java/org/apache/geode/e2e/GetPutSteps.java | 11 --- .../geode/e2e/container/DockerCluster.java | 32 +++- .../org/apache/geode/e2e/get_put.story | 3 +- 3 files changed, 33 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ff26e83/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java index d427670..b6242d3 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java @@ -1,12 +1,9 @@ package org.apache.geode.e2e; -import static org.apache.geode.internal.cache.execute.DistributedRegionFunctionExecutionDUnitTest.region; -import static org.bouncycastle.crypto.tls.ConnectionEnd.client; import static org.junit.Assert.assertEquals; import com.spotify.docker.client.exceptions.DockerException; import org.apache.geode.cache.CacheClosedException; -import org.apache.geode.cache.CacheFactory; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientCache; import org.apache.geode.cache.client.ClientCacheFactory; @@ -51,6 +48,11 @@ public class GetPutSteps { cluster.gfshCommand(String.format("create region --name=%s --type=%s", name, type)); } + @Given(value = "region $name is created as $type with redundancy $redundancy", priority = 1) + public void createRegionWithRedundancy(String name, String type, Integer redundancy) throws Exception { +cluster.gfshCommand(String.format("create region --name=%s --type=%s --redundancy=%d", name, type, redundancy)); + } + @Given("server $idx is killed") public void killServer(int idx) throws Exception { cluster.killServer(idx); @@ -70,6 +72,7 @@ public class GetPutSteps { ClientCache cache = getClientCache(); Region region = cache.getRegion(name); +assertEquals(count, region.keySetOnServer().size()); for (int i = 0; i < count; i++) { assertEquals("value_" + i, region.get("key_" + i)); } @@ -85,7 +88,7 @@ public class GetPutSteps { } cache = new ClientCacheFactory(). - set("log-level", "fine"). + set("log-level", "warn"). addPoolLocator("localhost", cluster.getLocatorPort()). create(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ff26e83/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java b/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java index 875fa78..96dae81 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/container/DockerCluster.java @@ -11,6 +11,7 @@ import java.util.Map; import com.spotify.docker.client.DefaultDockerClient; import com.spotify.docker.client.DockerClient; import com.spotify.docker.client.LogStream; +import com.spotify.docker.client.exceptions.ContainerNotFoundException; import com.spotify.docker.client.exceptions.DockerException; import com.spotify.docker.client.messages.Container; import com.spotify.docker.client.messages.ContainerConfig; @@ -18,7 +19,6 @@ import com.spotify.docker.client.messages.ContainerCreation; import com.spotify.docker.client.messages.HostConfig; import com.spotify.docker.client.messages.NetworkSettings; import com.spotify.docker.client.messages.PortBinding; -import com.sun.javaws.exceptions.InvalidArgumentException; public class DockerCluster { @@ -93,7 +93,8 @@ public class DockerCluster { String[] command = { "/tmp/work/bin/gfsh", "start locator", -String.format("--name=%s-locator-%d", name, i) +String.format("--name=%s-locator-%d", name, i), + "--J=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" }; Map ports = new HashMap<>(); @@ -101,6 +102,10 @@ public class
[1/2] incubator-geode git commit: Add a few more basic tests
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing 75521268a -> 0ff26e83d Add a few more basic tests Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/946ff2c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/946ff2c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/946ff2c7 Branch: refs/heads/feature/e2e-testing Commit: 946ff2c7d764331d02385eab2eed6f5cb7af6615 Parents: 7552126 Author: Jens DeppeAuthored: Tue Oct 4 14:38:15 2016 -0700 Committer: Jens Deppe Committed: Tue Oct 4 14:38:15 2016 -0700 -- .../test/java/org/apache/geode/e2e/GetPut.java | 3 +- .../java/org/apache/geode/e2e/GetPutSteps.java | 34 +--- .../geode/e2e/container/DockerCluster.java | 10 ++ .../org/apache/geode/e2e/get_put.story | 10 +- 4 files changed, 50 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/946ff2c7/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java b/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java index e62194b..4b4a79f 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java @@ -11,7 +11,8 @@ import org.jbehave.core.steps.InstanceStepsFactory; public class GetPut extends JUnitStory { - // Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is need ed + // Here we specify the configuration, starting from default MostUsefulConfiguration, + // and changing only what is needed @Override public Configuration configuration() { return new MostUsefulConfiguration() http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/946ff2c7/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java index bb4db31..d427670 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java @@ -1,8 +1,11 @@ package org.apache.geode.e2e; +import static org.apache.geode.internal.cache.execute.DistributedRegionFunctionExecutionDUnitTest.region; +import static org.bouncycastle.crypto.tls.ConnectionEnd.client; import static org.junit.Assert.assertEquals; import com.spotify.docker.client.exceptions.DockerException; +import org.apache.geode.cache.CacheClosedException; import org.apache.geode.cache.CacheFactory; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientCache; @@ -22,6 +25,7 @@ public class GetPutSteps { @BeforeStories public void teardownContainers() throws DockerException, InterruptedException { +// Stop and delete all current containers DockerCluster.scorch(); } @@ -47,12 +51,14 @@ public class GetPutSteps { cluster.gfshCommand(String.format("create region --name=%s --type=%s", name, type)); } + @Given("server $idx is killed") + public void killServer(int idx) throws Exception { +cluster.killServer(idx); + } + @When("I put $count entries into region $name") public void when(int count, String name) throws Exception { -ClientCache cache = new ClientCacheFactory(). - set("log-level", "warn"). - addPoolLocator("localhost", cluster.getLocatorPort()). - create(); +ClientCache cache = getClientCache(); Region region = cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(name); for (int i = 0; i < count; i++) { region.put("key_" + i, "value_" + i); @@ -61,11 +67,29 @@ public class GetPutSteps { @Then("I can get $count entries from region $name") public void then(int count, String name) throws Exception { -Region region = CacheFactory.getAnyInstance().getRegion(name); +ClientCache cache = getClientCache(); +Region region = cache.getRegion(name); for (int i = 0; i < count; i++) { assertEquals("value_" + i, region.get("key_" + i)); } } + + private ClientCache getClientCache() { +ClientCache cache; +try { + cache = ClientCacheFactory.getAnyInstance(); + return cache; +} catch (CacheClosedException ignored) { + // ignored +} + +cache = new ClientCacheFactory(). + set("log-level", "fine"). + addPoolLocator("localhost", cluster.getLocatorPort()). + create(); + +return cache; + } }
[21/38] incubator-geode git commit: GEODE-1941: delete unimplemented tests and reformat test
GEODE-1941: delete unimplemented tests and reformat test This does not complete ticket GEODE-1941. It will remain open until the unimplemented tests are created or are determined to not be valuable. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b1960154 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b1960154 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b1960154 Branch: refs/heads/feature/e2e-testing Commit: b1960154af8800970f4369aa7acf726e1c3e9d1e Parents: e055fad Author: Kirk LundAuthored: Tue Sep 27 17:08:23 2016 -0700 Committer: Kirk Lund Committed: Wed Sep 28 10:13:54 2016 -0700 -- .../net/SocketCreatorFactoryJUnitTest.java | 224 +-- 1 file changed, 102 insertions(+), 122 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b1960154/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java index b9faff0..7405eae 100644 --- a/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java @@ -17,19 +17,19 @@ package org.apache.geode.internal.net; import static org.apache.geode.distributed.ConfigurationProperties.*; +import static org.apache.geode.internal.net.SocketCreatorFactory.*; +import static org.apache.geode.internal.security.SecurableCommunicationChannel.*; +import static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.util.Properties; import org.junit.After; -import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.apache.geode.distributed.internal.DistributionConfigImpl; -import org.apache.geode.internal.security.SecurableCommunicationChannel; -import org.apache.geode.test.dunit.Assert; import org.apache.geode.test.junit.categories.IntegrationTest; import org.apache.geode.util.test.TestUtil; @@ -38,148 +38,148 @@ public class SocketCreatorFactoryJUnitTest { @After public void tearDown() throws Exception { -SocketCreatorFactory.close(); +close(); } @Test public void testNewSSLConfigSSLComponentLocator() throws Exception { -Properties properties = configureSSLProperties(SecurableCommunicationChannel.LOCATOR.getConstant()); +Properties properties = configureSSLProperties(LOCATOR.getConstant()); DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties); -SocketCreatorFactory.setDistributionConfig(distributionConfig); - - Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL()); - Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL()); - Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL()); - Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL()); - Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL()); - Assert.assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL()); +setDistributionConfig(distributionConfig); + +assertTrue(getSocketCreatorForComponent(LOCATOR).useSSL()); +assertFalse(getSocketCreatorForComponent(CLUSTER).useSSL()); +assertFalse(getSocketCreatorForComponent(GATEWAY).useSSL()); +assertFalse(getSocketCreatorForComponent(JMX).useSSL()); +assertFalse(getSocketCreatorForComponent(SERVER).useSSL()); +assertFalse(getSocketCreatorForComponent(WEB).useSSL()); } @Test public void testNewSSLConfigSSLComponentALL() throws Exception { -Properties properties = configureSSLProperties(SecurableCommunicationChannel.ALL.getConstant()); +Properties properties = configureSSLProperties(ALL.getConstant()); DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties); -SocketCreatorFactory.setDistributionConfig(distributionConfig); - - Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL()); - Assert.assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL()); -
[10/38] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-1801
Merge branch 'develop' into feature/GEODE-1801 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4609eace Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4609eace Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4609eace Branch: refs/heads/feature/e2e-testing Commit: 4609eace077ccbb3cdd8bc83460c210032bfa75d Parents: e29b775 6555c31 Author: Udo KohlmeyerAuthored: Tue Sep 27 07:01:02 2016 +1000 Committer: Udo Kohlmeyer Committed: Tue Sep 27 07:01:02 2016 +1000 -- .../geode/internal/net/SSLConfigurationFactory.java | 2 +- .../java/org/apache/geode/internal/net/SocketCreator.java | 2 +- .../internal/configuration/domain/XmlEntity.java | 10 +- .../org/apache/geode/pdx/internal/PdxInstanceImpl.java| 6 +++--- geode-examples/gradle.properties | 4 ++-- geode-spark-connector/project/Settings.scala | 2 +- gradle/rat.gradle | 1 + 7 files changed, 14 insertions(+), 13 deletions(-) --
[36/38] incubator-geode git commit: Able to execute gfsh commands
Able to execute gfsh commands Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4910c626 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4910c626 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4910c626 Branch: refs/heads/feature/e2e-testing Commit: 4910c62604cf12b48556e532b7436aeb914fdd5b Parents: a2ce01d Author: Jens DeppeAuthored: Fri Sep 30 14:42:40 2016 -0700 Committer: Jens Deppe Committed: Fri Sep 30 14:42:40 2016 -0700 -- .../test/java/org/apache/geode/DockerTest.java | 45 - .../apache/geode/container/DockerCluster.java | 132 -- .../java/org/apache/geode/e2e/DockerTest.java | 43 + .../geode/e2e/container/DockerCluster.java | 182 +++ 4 files changed, 225 insertions(+), 177 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4910c626/geode-core/src/test/java/org/apache/geode/DockerTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/DockerTest.java b/geode-core/src/test/java/org/apache/geode/DockerTest.java deleted file mode 100644 index b5bc050..000 --- a/geode-core/src/test/java/org/apache/geode/DockerTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.apache.geode; - -import static org.junit.Assert.*; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import org.apache.geode.container.DockerCluster; - -public class DockerTest { - - private DockerCluster cluster; - - @Before - public void setup() throws Exception { -cluster = new DockerCluster("testy", 2); - } - - @After - public void teardown() throws Exception { -cluster.stop(); - } - -// @Test - public void sanity() throws Exception { -cluster.start(); -assertNotNull("Locator address is null", cluster.getLocatorAddress()); - } - -// @Test - public void testInvalidGfshCommand() throws Exception { -String id = cluster.startContainer(0); -int r = cluster.execCommand(id, new String[] { "/tmp/work/bin/gfsh", "startx" }); -assertEquals(1, r); - } - - @Test - public void testCreateRegion() throws Exception { -cluster.start(); -cluster.gfshCommand("create region --name=FOO --type=REPLICATE"); -cluster.gfshCommand("list regions"); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4910c626/geode-core/src/test/java/org/apache/geode/container/DockerCluster.java -- diff --git a/geode-core/src/test/java/org/apache/geode/container/DockerCluster.java b/geode-core/src/test/java/org/apache/geode/container/DockerCluster.java deleted file mode 100644 index fea2e1a..000 --- a/geode-core/src/test/java/org/apache/geode/container/DockerCluster.java +++ /dev/null @@ -1,132 +0,0 @@ -package org.apache.geode.container; - -import static com.google.common.base.Charsets.*; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.spotify.docker.client.DefaultDockerClient; -import com.spotify.docker.client.DockerClient; -import com.spotify.docker.client.LogStream; -import com.spotify.docker.client.exceptions.DockerException; -import com.spotify.docker.client.messages.ContainerConfig; -import com.spotify.docker.client.messages.ContainerCreation; -import com.spotify.docker.client.messages.HostConfig; - -public class DockerCluster { - - private DockerClient docker; - private int locatorCount; - private int serverCount; - private String name; - private List nodeIds; - private String locatorAddress; - - public DockerCluster(String name, int serverCount) { -this(name, 1, serverCount); - } - - public DockerCluster(String name, int locatorCount, int serverCount) { -docker = DefaultDockerClient.builder(). - uri("unix:///var/run/docker.sock").build(); - -this.name = name; -this.locatorCount = locatorCount; -this.serverCount = serverCount; -this.nodeIds = new ArrayList<>(); - } - - public void start() throws Exception { -startLocators(); -startServers(); - } - - public String startContainer(int index) throws DockerException, InterruptedException { -String geodeHome = System.getenv("GEODE_HOME"); -String vol = String.format("%s:/tmp/work", geodeHome); - -HostConfig hostConfig = HostConfig. - builder(). - appendBinds(vol). - build(); - -ContainerConfig config = ContainerConfig.builder(). - image("gemfire/ubuntu-gradle"). - openStdin(true). - hostname(String.format("%s-%d", name, index)). - hostConfig(hostConfig). - workingDir("/tmp"). - build(); - -ContainerCreation creation =
[19/38] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-1801
Merge branch 'develop' into feature/GEODE-1801 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/eafd8cc9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/eafd8cc9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/eafd8cc9 Branch: refs/heads/feature/e2e-testing Commit: eafd8cc9c85f70203ab812e308423791cdbfd581 Parents: 4345fda 0ad1848 Author: Udo KohlmeyerAuthored: Wed Sep 28 09:35:34 2016 +1000 Committer: Udo Kohlmeyer Committed: Wed Sep 28 09:35:34 2016 +1000 -- build.gradle| 11 ++ etc/eclipseFormatterProfile.xml | 2 +- etc/intellijIdeaCodeStyle.xml | 2 + geode-assembly/build.gradle | 2 + .../geode/internal/cache/AbstractRegionMap.java | 59 +- .../geode/internal/net/JSSESocketJUnitTest.java | 111 ++- .../net/SocketCreatorFactoryJUnitTest.java | 77 +++-- .../security/AbstractSecureServerDUnitTest.java | 7 +- ...ientRegisterInterestAuthDistributedTest.java | 1 - geode-examples/build.gradle | 6 + geode-examples/replicated/scripts/pidkiller.sh | 5 +- geode-examples/replicated/scripts/setEnv.sh | 2 +- geode-examples/replicated/scripts/startAll.sh | 2 +- geode-examples/replicated/scripts/stopAll.sh| 2 +- 14 files changed, 138 insertions(+), 151 deletions(-) --
[07/38] incubator-geode git commit: GEODE-1801: Updated the ClientTypeRegistration.java to handle Snapshot reading on the client side.
GEODE-1801: Updated the ClientTypeRegistration.java to handle Snapshot reading on the client side. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/cf0b3784 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/cf0b3784 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/cf0b3784 Branch: refs/heads/feature/e2e-testing Commit: cf0b378429b643513366ce90226e4f6472056c7b Parents: a1938b3 Author: Udo KohlmeyerAuthored: Mon Sep 26 09:43:53 2016 +1000 Committer: Udo Kohlmeyer Committed: Mon Sep 26 09:43:53 2016 +1000 -- .../pdx/internal/ClientTypeRegistration.java| 277 +++ .../cache/snapshot/GFSnapshotDUnitTest.java | 216 +++ .../internal/cache/snapshot/TestObject.java | 78 ++ 3 files changed, 393 insertions(+), 178 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cf0b3784/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java -- diff --git a/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java b/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java index 9476ef4..b7f27f3 100644 --- a/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java +++ b/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java @@ -21,8 +21,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import org.apache.logging.log4j.Logger; - import org.apache.geode.InternalGemFireError; import org.apache.geode.cache.CacheClosedException; import org.apache.geode.cache.client.Pool; @@ -41,110 +39,90 @@ import org.apache.geode.cache.wan.GatewaySender; import org.apache.geode.internal.cache.GemFireCacheImpl; import org.apache.geode.internal.cache.PoolManagerImpl; import org.apache.geode.internal.logging.LogService; -import org.apache.geode.pdx.PdxInitializationException; +import org.apache.logging.log4j.Logger; /** * */ public class ClientTypeRegistration implements TypeRegistration { + private static final Logger logger = LogService.getLogger(); - + private final GemFireCacheImpl cache; - - private volatile boolean typeRegistryInUse = false; public ClientTypeRegistration(GemFireCacheImpl cache) { this.cache = cache; } - + public int defineType(PdxType newType) { -verifyConfiguration(); Collection pools = getAllPools(); - + ServerConnectivityException lastException = null; -for(Pool pool: pools) { +int newTypeId = -1; +for (Pool pool : pools) { try { -int result = GetPDXIdForTypeOp.execute((ExecutablePool) pool, newType); -newType.setTypeId(result); -sendTypeToAllPools(newType, result, pools, pool); -return result; - } catch(ServerConnectivityException e) { +newTypeId = GetPDXIdForTypeOp.execute((ExecutablePool) pool, newType); +newType.setTypeId(newTypeId); +sendTypeToAllPools(newType, newTypeId, pool); +return newTypeId; + } catch (ServerConnectivityException e) { //ignore, try the next pool. lastException = e; } } -if(lastException != null) { - throw lastException; -} else { - if (this.cache.isClosed()) { -throw new CacheClosedException("PDX detected cache was closed"); - } - throw new CacheClosedException("Client pools have been closed so the PDX type registry can not define a type."); -} +throw returnCorrectExceptionForFailure(pools, newTypeId, lastException); } - - private void sendTypeToAllPools(PdxType type, int id, - Collection pools, Pool definingPool) { - -for(Pool pool: pools) { - if(pool.equals(definingPool)) { -continue; - } - - try { -AddPDXTypeOp.execute((ExecutablePool) pool, id, type); - } catch(ServerConnectivityException ignore) { -logger.debug("Received an exception sending pdx type to pool {}, {}", pool, ignore.getMessage(), ignore); -//TODO DAN - is it really safe to ignore this? What if this is the pool -//we're about to do a put on? I think maybe we really should pass the context -//down to this point, if it is available. Maybe just an optional thread local? -//Then we could go straight to that pool to register the type and bail otherwise. - } + + private void sendTypeToAllPools(PdxType type, int id, Pool pool) { + +try { + AddPDXTypeOp.execute((ExecutablePool) pool, id, type); +} catch (ServerConnectivityException ignore) { + logger.debug("Received an
[09/38] incubator-geode git commit: GEODE-1938: Remove the exception ignore when a pool cannot connect to a server
GEODE-1938: Remove the exception ignore when a pool cannot connect to a server Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e29b7752 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e29b7752 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e29b7752 Branch: refs/heads/feature/e2e-testing Commit: e29b7752a2ab7e805c8c734198ce0203ead48622 Parents: cf0b378 Author: Udo KohlmeyerAuthored: Tue Sep 27 06:30:40 2016 +1000 Committer: Udo Kohlmeyer Committed: Tue Sep 27 06:30:40 2016 +1000 -- .../pdx/internal/ClientTypeRegistration.java | 19 ++- .../cache/snapshot/GFSnapshotDUnitTest.java | 6 ++ 2 files changed, 8 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e29b7752/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java -- diff --git a/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java b/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java index b7f27f3..261cc53 100644 --- a/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java +++ b/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java @@ -74,15 +74,11 @@ public class ClientTypeRegistration implements TypeRegistration { } private void sendTypeToAllPools(PdxType type, int id, Pool pool) { - try { AddPDXTypeOp.execute((ExecutablePool) pool, id, type); -} catch (ServerConnectivityException ignore) { - logger.debug("Received an exception sending pdx type to pool {}, {}", pool, ignore.getMessage(), ignore); - //TODO DAN - is it really safe to ignore this? What if this is the pool - //we're about to do a put on? I think maybe we really should pass the context - //down to this point, if it is available. Maybe just an optional thread local? - //Then we could go straight to that pool to register the type and bail otherwise. +} catch (ServerConnectivityException serverConnectivityException) { + logger.debug("Received an exception sending pdx type to pool {}, {}", pool, serverConnectivityException.getMessage(), serverConnectivityException); + throw serverConnectivityException; } } @@ -177,12 +173,9 @@ public class ClientTypeRegistration implements TypeRegistration { private void sendEnumIdToAllPools(EnumInfo enumInfo, int id, Pool pool) { try { AddPDXEnumOp.execute((ExecutablePool) pool, id, enumInfo); -} catch (ServerConnectivityException ignore) { - logger.debug("Received an exception sending pdx type to pool {}, {}", pool, ignore.getMessage(), ignore); - //TODO DAN - is it really safe to ignore this? What if this is the pool - //we're about to do a put on? I think maybe we really should pass the context - //down to this point, if it is available. Maybe just an optional thread local? - //Then we could go straight to that pool to register the type and bail otherwise. +} catch (ServerConnectivityException serverConnectivityException) { + logger.debug("Received an exception sending pdx type to pool {}, {}", pool, serverConnectivityException.getMessage(), serverConnectivityException); + throw serverConnectivityException; } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e29b7752/geode-core/src/test/java/org/apache/geode/internal/cache/snapshot/GFSnapshotDUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/snapshot/GFSnapshotDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/snapshot/GFSnapshotDUnitTest.java index 2ca3aec..b1b2eca 100644 --- a/geode-core/src/test/java/org/apache/geode/internal/cache/snapshot/GFSnapshotDUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/cache/snapshot/GFSnapshotDUnitTest.java @@ -61,8 +61,6 @@ public class GFSnapshotDUnitTest extends JUnit4DistributedTestCase { private VM server; private VM client; private Host host; - private LocatorLauncher locatorLauncher; - private static ServerLauncher serverLauncher; @Rule public SerializableTemporaryFolder temporaryFolder = new SerializableTemporaryFolder(); @@ -167,7 +165,7 @@ public class GFSnapshotDUnitTest extends JUnit4DistributedTestCase { for (String propertyName : properties.stringPropertyNames()) { builder.set(propertyName, properties.getProperty(propertyName)); } -locatorLauncher = builder.setBindAddress(serverHostName) +
[30/38] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-1801
Merge branch 'develop' into feature/GEODE-1801 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f686e9e1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f686e9e1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f686e9e1 Branch: refs/heads/feature/e2e-testing Commit: f686e9e1e5c9c6c543ec70aba94d387e02820643 Parents: eafd8cc c9790a4 Author: Udo KohlmeyerAuthored: Thu Sep 29 09:27:52 2016 +1000 Committer: Udo Kohlmeyer Committed: Thu Sep 29 09:27:52 2016 +1000 -- geode-assembly/build.gradle |4 + .../controllers/RestAPIsWithSSLDUnitTest.java |8 +- .../java/org/apache/geode/CancelException.java |1 + .../java/org/apache/geode/DataSerializer.java | 36 +- .../java/org/apache/geode/GemFireException.java |1 + .../org/apache/geode/cache/CacheException.java |2 + .../geode/cache/CacheRuntimeException.java |3 +- .../geode/cache/OperationAbortedException.java |3 +- .../geode/cache/RegionExistsException.java |3 +- .../query/internal/index/CompactRangeIndex.java | 10 + .../cache/query/internal/index/HashIndex.java | 44 +- .../query/internal/index/IndexManager.java |3 +- .../cache/query/internal/index/IndexStore.java |2 +- .../distributed/ConfigurationProperties.java|6 +- .../internal/AbstractDistributionConfig.java|2 +- .../internal/DistributionConfig.java| 18 +- .../internal/DistributionConfigImpl.java| 16 +- .../internal/SharedConfiguration.java | 65 +- .../geode/internal/InternalDataSerializer.java | 131 +- .../cache/ClusterConfigurationLoader.java | 171 +- .../geode/internal/cache/GemFireCacheImpl.java | 161 +- .../cache/tier/sockets/BaseCommand.java | 31 +- .../tier/sockets/OldClientSupportService.java | 61 + .../internal/cache/wan/BatchException70.java| 34 +- .../geode/internal/i18n/LocalizedStrings.java |4 + .../internal/net/SSLConfigurationFactory.java |2 +- .../geode/management/GemFireProperties.java | 10 +- .../internal/SystemManagementService.java |8 - .../internal/beans/BeanUtilFuncs.java |2 +- .../org/apache/geode/pdx/internal/PdxType.java | 10 + .../apache/geode/redis/GeodeRedisServer.java| 28 +- .../dunit/CompactRangeIndexQueryDUnitTest.java | 104 -- ...AbstractIndexMaintenanceIntegrationTest.java | 62 + ...actRangeIndexMaintenanceIntegrationTest.java | 60 + .../CompactRangeIndexQueryIntegrationTest.java | 99 ++ .../internal/index/HashIndexJUnitTest.java | 1592 -- .../HashIndexMaintenanceIntegrationTest.java| 72 + .../index/HashIndexQueryIntegrationTest.java| 1567 + .../RangeIndexMaintenanceIntegrationTest.java | 39 + .../internal/cache/GemFireCacheImplTest.java| 57 +- .../tier/sockets/command/ContainsKey66Test.java |2 + .../tier/sockets/command/CreateRegionTest.java |2 + .../tier/sockets/command/Destroy65Test.java |2 + .../tier/sockets/command/DestroyRegionTest.java |2 + .../cache/tier/sockets/command/DestroyTest.java |2 + .../cache/tier/sockets/command/Get70Test.java |2 + .../tier/sockets/command/InvalidateTest.java|2 + .../cache/tier/sockets/command/Put61Test.java |2 + .../cache/tier/sockets/command/Put65Test.java |2 + .../cache/tier/sockets/command/PutTest.java |2 + .../cache/tier/sockets/command/RequestTest.java |2 + .../sockets/command/UnregisterInterestTest.java |2 + .../net/ClientSocketFactoryIntegrationTest.java | 100 ++ .../geode/internal/net/JSSESocketJUnitTest.java | 223 --- .../net/SSLConfigurationFactoryJUnitTest.java | 13 +- .../internal/net/SSLSocketIntegrationTest.java | 184 ++ .../net/SocketCreatorFactoryJUnitTest.java | 272 ++- .../org/apache/geode/redis/RedisServerTest.java | 84 + .../PDXGfshPostProcessorOnRemoteServerTest.java | 10 +- .../SecurityClusterConfigDUnitTest.java | 211 +++ .../SecurityWithoutClusterConfigDUnitTest.java | 137 ++ .../security/StartServerAuthorizationTest.java | 18 +- .../test/dunit/standalone/ProcessManager.java | 28 +- .../sanctionedDataSerializables.txt |2 +- .../codeAnalysis/sanctionedSerializables.txt| 13 +- geode-old-client-support/build.gradle | 25 + .../com/gemstone/gemfire/GemFireException.java | 150 ++ .../gemfire/OldClientSupportProvider.java | 134 ++ .../execute/EmtpyRegionFunctionException.java | 65 + .../cache/execute/FunctionException.java| 131 ++ .../FunctionInvocationTargetException.java | 93 + ...org.apache.geode.internal.cache.CacheService |1 +
[01/38] incubator-geode git commit: GEODE-1906: fix misspelling of Successfully
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing a2ce01d33 -> 75521268a GEODE-1906: fix misspelling of Successfully fix misspelling of Successfully, organize imports, reformat and cleanup classes Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/331fc171 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/331fc171 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/331fc171 Branch: refs/heads/feature/e2e-testing Commit: 331fc1717f725440c3e23192eeffc0fac09fb1b9 Parents: 85e97c3 Author: Kirk LundAuthored: Fri Sep 16 11:58:38 2016 -0700 Committer: Kirk Lund Committed: Thu Sep 22 10:49:49 2016 -0700 -- .../internal/beans/QueryDataFunction.java | 268 -- ...onedRegionHAFailureAndRecoveryDUnitTest.java | 282 +++ 2 files changed, 214 insertions(+), 336 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/331fc171/geode-core/src/main/java/org/apache/geode/management/internal/beans/QueryDataFunction.java -- diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/QueryDataFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/QueryDataFunction.java index b174ddb..bcfbf43 100644 --- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/QueryDataFunction.java +++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/QueryDataFunction.java @@ -70,41 +70,51 @@ import org.apache.geode.management.internal.cli.json.TypedJson; /** * This function is executed on one or multiple members based on the member * input to DistributedSystemMXBean.queryData() - * - * */ +@SuppressWarnings({ "deprecation", "unchecked" }) public class QueryDataFunction extends FunctionAdapter implements InternalEntity { + private static final long serialVersionUID = 1L; + private static final Logger logger = LogService.getLogger(); - + + private static final String MEMBER_KEY = "member"; + private static final String RESULT_KEY = "result"; + private static final String NO_DATA_FOUND = "No Data Found"; + private static final String QUERY_EXEC_SUCCESS = "Query Executed Successfully"; + private static final int DISPLAY_MEMBERWISE = 0; + private static final int QUERY = 1; + private static final int REGION = 2; + private static final int LIMIT = 3; + private static final int QUERY_RESULTSET_LIMIT = 4; + private static final int QUERY_COLLECTIONS_DEPTH = 5; + private static final String SELECT_EXPR = "\\s*SELECT\\s+.+\\s+FROM\\s+.+"; + private static final Pattern SELECT_EXPR_PATTERN = Pattern.compile(SELECT_EXPR, Pattern.CASE_INSENSITIVE); + private static final String SELECT_WITH_LIMIT_EXPR = "\\s*SELECT\\s+.+\\s+FROM(\\s+|(.*\\s+))LIMIT\\s+[0-9]+.*"; + private static final Pattern SELECT_WITH_LIMIT_EXPR_PATTERN = Pattern.compile(SELECT_WITH_LIMIT_EXPR, Pattern.CASE_INSENSITIVE); + @Override public boolean hasResult() { return true; } - private static final long serialVersionUID = 1L; - @Override - public void execute(FunctionContext context) { + public void execute(final FunctionContext context) { Object[] functionArgs = (Object[]) context.getArguments(); boolean showMember = (Boolean) functionArgs[DISPLAY_MEMBERWISE]; String queryString = (String) functionArgs[QUERY]; String regionName = (String) functionArgs[REGION]; int limit = (Integer) functionArgs[LIMIT]; - + int queryResultSetLimit = (Integer) functionArgs[QUERY_RESULTSET_LIMIT]; - + int queryCollectionsDepth = (Integer) functionArgs[QUERY_COLLECTIONS_DEPTH]; - - + try { - context.getResultSender().lastResult( - selectWithType(context, queryString, showMember, regionName, limit, queryResultSetLimit, - queryCollectionsDepth)); + context.getResultSender().lastResult(selectWithType(context, queryString, showMember, regionName, limit, queryResultSetLimit, queryCollectionsDepth)); } catch (Exception e) { context.getResultSender().sendException(e); } - } @Override @@ -112,30 +122,28 @@ public class QueryDataFunction extends FunctionAdapter implements InternalEntity return ManagementConstants.QUERY_DATA_FUNCTION; } - @SuppressWarnings( { "unchecked" }) - public QueryDataFunctionResult selectWithType(FunctionContext context, String queryString, boolean showMember, - String regionName, int limit, int queryResultSetLimit, int queryCollectionsDepth) throws Exception { - + private QueryDataFunctionResult selectWithType(final FunctionContext context, +
[15/38] incubator-geode git commit: GEODE-1939: change test category to IntegrationTest
GEODE-1939: change test category to IntegrationTest * remove class hierarchy because it repeats running of tests * reformat, privatize vars and methods * remove catching of unexpected exceptions * remove system out statements * move all setup to setup method * fix minor concurrency bug in JSSESocketJUnitTest Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ddf4f3db Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ddf4f3db Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ddf4f3db Branch: refs/heads/feature/e2e-testing Commit: ddf4f3dbc6cbd1ca68ba812128c25163aa5c23ac Parents: 9f422dd Author: Kirk LundAuthored: Tue Sep 27 13:50:21 2016 -0700 Committer: Kirk Lund Committed: Tue Sep 27 13:54:40 2016 -0700 -- .../geode/internal/net/JSSESocketJUnitTest.java | 111 ++- .../net/SocketCreatorFactoryJUnitTest.java | 77 +++-- 2 files changed, 76 insertions(+), 112 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ddf4f3db/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java index 4a62ec7..e63a46f 100755 --- a/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java @@ -30,6 +30,8 @@ import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; @@ -43,9 +45,12 @@ import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.junit.contrib.java.lang.system.SystemErrRule; +import org.junit.contrib.java.lang.system.SystemOutRule; import org.junit.experimental.categories.Category; import org.junit.rules.TestName; +import org.apache.geode.distributed.ClientSocketFactory; import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.distributed.internal.DistributionConfigImpl; import org.apache.geode.internal.AvailablePort; @@ -62,48 +67,39 @@ import org.apache.geode.util.test.TestUtil; @Category(IntegrationTest.class) public class JSSESocketJUnitTest { - public - @Rule - TestName name = new TestName(); - - private static final org.apache.logging.log4j.Logger logger = LogService.getLogger(); + private static volatile boolean factoryInvoked; - ServerSocket acceptor; - Socket server; + private ServerSocket acceptor; + private Socket server; + private int randport; - static ByteArrayOutputStream baos = new ByteArrayOutputStream(); + @Rule + public TestName name = new TestName(); - private int randport = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); + @Rule + public SystemOutRule systemOutRule = new SystemOutRule(); @Before public void setUp() throws Exception { -System.out.println("\n\n## setup " + name.getMethodName() + " \n\n"); -server = null; -acceptor = null; -baos.reset(); +randport = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); } @After public void tearDown() throws Exception { -System.out.println("\n\n## teardown " + name.getMethodName() + " \n\n"); - if (server != null) { server.close(); } if (acceptor != null) { acceptor.close(); } -System.out.println(baos.toString()); SocketCreatorFactory.close(); } - //- test methods -- - @Test public void testSSLSocket() throws Exception { -final Object[] receiver = new Object[1]; +systemOutRule.mute().enableLog(); -TestAppender.create(); +final Object[] receiver = new Object[1]; // Get original base log level Level originalBaseLevel = LogService.getBaseLogLevel(); @@ -136,7 +132,7 @@ public class JSSESocketJUnitTest { Socket client = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport); ObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream()); - String expected = new String("testing " + name.getMethodName()); + String expected = "testing " + name.getMethodName(); oos.writeObject(expected); oos.flush(); @@ -144,27 +140,19 @@ public class JSSESocketJUnitTest {
[35/38] incubator-geode git commit: GEODE-1548: Specifying --J=-Dgemfire.jmx-manager-hostname-for-clients now automatically sets -Djava.rmi.server.hostname
GEODE-1548: Specifying --J=-Dgemfire.jmx-manager-hostname-for-clients now automatically sets -Djava.rmi.server.hostname * This closes #248 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/db4ad02f Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/db4ad02f Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/db4ad02f Branch: refs/heads/feature/e2e-testing Commit: db4ad02f078bde786e8a83d8e281419fd5141916 Parents: 0a6e1a5 Author: Jared StewartAuthored: Thu Sep 29 10:43:30 2016 -0700 Committer: Jinmei Liao Committed: Fri Sep 30 13:16:09 2016 -0700 -- .../management/internal/ManagementAgent.java| 7 ++- .../security/JavaRmiServerNameTest.java | 55 2 files changed, 61 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db4ad02f/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java -- diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java b/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java index f1daa78..3af508e 100755 --- a/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java +++ b/geode-core/src/main/java/org/apache/geode/management/internal/ManagementAgent.java @@ -348,7 +348,7 @@ public class ManagementAgent { final int port = this.config.getJmxManagerPort(); final String hostname; final InetAddress bindAddr; -if (this.config.getJmxManagerBindAddress().equals("")) { +if (StringUtils.isBlank(this.config.getJmxManagerBindAddress())) { hostname = SocketCreator.getLocalHost().getHostName(); bindAddr = null; } else { @@ -356,6 +356,11 @@ public class ManagementAgent { bindAddr = InetAddress.getByName(hostname); } +String jmxManagerHostnameForClients = this.config.getJmxManagerHostnameForClients(); +if (!StringUtils.isBlank(jmxManagerHostnameForClients)) { + System.setProperty("java.rmi.server.hostname", jmxManagerHostnameForClients); +} + final SocketCreator socketCreator = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX); final boolean ssl = socketCreator.useSSL(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db4ad02f/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java new file mode 100644 index 000..c544e6f --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java @@ -0,0 +1,55 @@ +/* + * 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 org.apache.geode.management.internal.security; + +import static org.apache.geode.distributed.ConfigurationProperties.*; +import static org.junit.Assert.*; + +import java.util.Properties; + +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import org.apache.geode.cache.CacheFactory; +import org.apache.geode.internal.AvailablePort; +import org.apache.geode.test.junit.categories.IntegrationTest; + +@Category(IntegrationTest.class) +public class JavaRmiServerNameTest { + + private static final String JMX_HOST = "myHostname"; + + private static int jmxManagerPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); + + //https://issues.apache.org/jira/browse/GEODE-1548 + @Test + public void testThatJavaRmiServerNameGetsSet() { +Properties properties = new Properties(); +properties.put(LOCATORS, ""); +properties.put(MCAST_PORT, "0"); +
[20/38] incubator-geode git commit: GEODE-1659: put security properties in the cluster config and applied to all the members in the cluster.
GEODE-1659: put security properties in the cluster config and applied to all the members in the cluster. * break down request and apply cluster configuration into individual steps so that we can apply properties before starting services, and apply cache.xml after services are started * added more dunit tests Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e055fad0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e055fad0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e055fad0 Branch: refs/heads/feature/e2e-testing Commit: e055fad08fc0eacf829d9770956958a261fb678a Parents: 0ad1848 Author: Jinmei LiaoAuthored: Fri Sep 23 10:40:05 2016 -0700 Committer: Jinmei Liao Committed: Wed Sep 28 07:50:03 2016 -0700 -- .../internal/SharedConfiguration.java | 65 -- .../cache/ClusterConfigurationLoader.java | 171 +-- .../geode/internal/cache/GemFireCacheImpl.java | 161 +- .../geode/internal/i18n/LocalizedStrings.java | 4 + .../internal/SystemManagementService.java | 8 - .../internal/cache/GemFireCacheImplTest.java| 57 - .../PDXGfshPostProcessorOnRemoteServerTest.java | 10 +- .../SecurityClusterConfigDUnitTest.java | 211 +++ .../SecurityWithoutClusterConfigDUnitTest.java | 137 .../security/StartServerAuthorizationTest.java | 18 +- .../codeAnalysis/sanctionedSerializables.txt| 3 - 11 files changed, 667 insertions(+), 178 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e055fad0/geode-core/src/main/java/org/apache/geode/distributed/internal/SharedConfiguration.java -- diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/SharedConfiguration.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/SharedConfiguration.java index 2e6677f..c5bd72b 100644 --- a/geode-core/src/main/java/org/apache/geode/distributed/internal/SharedConfiguration.java +++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/SharedConfiguration.java @@ -16,6 +16,8 @@ */ package org.apache.geode.distributed.internal; +import static org.apache.geode.distributed.ConfigurationProperties.*; + import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; @@ -83,13 +85,11 @@ import org.apache.geode.management.internal.configuration.messages.SharedConfigu import org.apache.geode.management.internal.configuration.utils.XmlUtils; import org.apache.geode.management.internal.configuration.utils.ZipUtils; -import static org.apache.geode.distributed.ConfigurationProperties.*; - @SuppressWarnings({ "deprecation", "unchecked" }) public class SharedConfiguration { private static final Logger logger = LogService.getLogger(); - + /** * Name of the directory where the shared configuration artifacts are stored */ @@ -127,7 +127,7 @@ public class SharedConfiguration { private final DistributedLockService sharedConfigLockingService; /** - * Gets or creates (if not created) shared configuration lock service + * Gets or creates (if not created) shared configuration lock service */ public static DistributedLockService getSharedConfigLockService(DistributedSystem ds) { DistributedLockService sharedConfigDls = DLockService.getServiceNamed(SHARED_CONFIG_LOCK_SERVICE_NAME); @@ -202,7 +202,7 @@ public class SharedConfiguration { Configuration configuration = (Configuration) configRegion.get(group); if (configuration == null) { configuration = new Configuration(group); - } + } String xmlContent = configuration.getCacheXmlContent(); if (xmlContent == null || xmlContent.isEmpty()) { StringWriter sw = new StringWriter(); @@ -271,8 +271,10 @@ public class SharedConfiguration { } else { //Write out the existing configuration into the 'shared_config' directory //And get deployed jars from other locators. - lockSharedConfiguration(); - try { + lockSharedConfiguration(); + putSecurityPropsIntoClusterConfig(configRegion); + + try { Set > configEntries = configRegion.entrySet(); for (Entry configEntry : configEntries) { @@ -293,6 +295,23 @@ public class SharedConfiguration { status.set(SharedConfigurationStatus.RUNNING); } + private void putSecurityPropsIntoClusterConfig(final Region configRegion) { +Properties securityProps = cache.getDistributedSystem().getSecurityProperties(); +Configuration clusterPropertiesConfig
[34/38] incubator-geode git commit: GEODE-1949: Adding geode-rebalancer to the binary distribution
GEODE-1949: Adding geode-rebalancer to the binary distribution Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0a6e1a53 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0a6e1a53 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0a6e1a53 Branch: refs/heads/feature/e2e-testing Commit: 0a6e1a5339243b069a04d8010a869bfd1f4172c1 Parents: 22afc3b Author: Dan SmithAuthored: Thu Sep 29 15:54:47 2016 -0700 Committer: Dan Smith Committed: Thu Sep 29 15:54:47 2016 -0700 -- geode-assembly/build.gradle | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0a6e1a53/geode-assembly/build.gradle -- diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle index c46c74a..cc2518b 100644 --- a/geode-assembly/build.gradle +++ b/geode-assembly/build.gradle @@ -61,6 +61,7 @@ dependencies { archives project(':geode-pulse') archives project(':geode-wan') archives project(':geode-cq') + archives project(':geode-rebalancer') testCompile project(':geode-junit') testCompile files(project(':geode-core').sourceSets.test.output) @@ -337,6 +338,9 @@ distributions { from project(":geode-old-client-support").configurations.runtime from project(":geode-old-client-support").configurations.archives.allArtifacts.files +from project(":geode-rebalancer").configurations.runtime +from project(":geode-rebalancer").configurations.archives.allArtifacts.files + from configurations.bundled from configurations.gfshDependencies
[26/38] incubator-geode git commit: GEODE-1944: Reevaluation of index regionPath catches EntryDestroyedException
GEODE-1944: Reevaluation of index regionPath catches EntryDestroyedException * Force removal of region entry from index if entry destroyed exception is caught * Renamed and recategorized tests Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b5b7203a Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b5b7203a Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b5b7203a Branch: refs/heads/feature/e2e-testing Commit: b5b7203a10c4d81f4ff8e9603b4c912413c0b91e Parents: 61d3ec3 Author: Jason HuynhAuthored: Mon Sep 26 11:32:36 2016 -0700 Committer: Jason Huynh Committed: Wed Sep 28 15:27:08 2016 -0700 -- .../query/internal/index/CompactRangeIndex.java | 10 + .../cache/query/internal/index/HashIndex.java | 44 +- .../query/internal/index/IndexManager.java |3 +- .../cache/query/internal/index/IndexStore.java |2 +- .../dunit/CompactRangeIndexQueryDUnitTest.java | 104 -- ...AbstractIndexMaintenanceIntegrationTest.java | 62 + ...actRangeIndexMaintenanceIntegrationTest.java | 60 + .../CompactRangeIndexQueryIntegrationTest.java | 99 ++ .../internal/index/HashIndexJUnitTest.java | 1592 -- .../HashIndexMaintenanceIntegrationTest.java| 72 + .../index/HashIndexQueryIntegrationTest.java| 1567 + .../RangeIndexMaintenanceIntegrationTest.java | 39 + 12 files changed, 1935 insertions(+), 1719 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b5b7203a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java -- diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java index c99da56..7e31d6c 100644 --- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java +++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/CompactRangeIndex.java @@ -16,6 +16,7 @@ */ package org.apache.geode.cache.query.internal.index; + import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; @@ -1475,6 +1476,15 @@ public class CompactRangeIndex extends AbstractIndex { doNestedIterations(0, add, context); + } catch (TypeMismatchException tme) { +if (tme.getRootCause() instanceof EntryDestroyedException) { + //This code relies on current implementation of remove mapping, relying on behavior that will force a + //crawl through the index to remove the entry if it exists, even if it is not present at the provided key + removeMapping(QueryService.UNDEFINED, target); +} +else { + throw new IMQException(tme); +} } catch (IMQException imqe) { throw imqe; } catch (Exception e) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b5b7203a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java -- diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java index 775daec..eb5407d 100755 --- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java +++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java @@ -35,6 +35,7 @@ import org.apache.logging.log4j.Logger; import org.apache.geode.cache.Cache; import org.apache.geode.cache.EntryDestroyedException; +import org.apache.geode.cache.EntryNotFoundException; import org.apache.geode.cache.Region; import org.apache.geode.cache.RegionAttributes; import org.apache.geode.cache.query.AmbiguousNameException; @@ -47,8 +48,6 @@ import org.apache.geode.cache.query.QueryInvocationTargetException; import org.apache.geode.cache.query.QueryService; import org.apache.geode.cache.query.SelectResults; import org.apache.geode.cache.query.TypeMismatchException; -import org.apache.geode.cache.query.internal.AttributeDescriptor; -import org.apache.geode.cache.query.internal.CompiledComparison; import org.apache.geode.cache.query.internal.CompiledIteratorDef; import org.apache.geode.cache.query.internal.CompiledPath; import org.apache.geode.cache.query.internal.CompiledSortCriterion; @@ -80,9 +79,6 @@ import org.apache.geode.internal.cache.persistence.query.CloseableIterator; import org.apache.geode.internal.i18n.LocalizedStrings; import
[28/38] incubator-geode git commit: GEODE-1927: add support for old GemFire remote sites (WAN)
GEODE-1927: add support for old GemFire remote sites (WAN) This adds a new JAR and associated cache service to Geode. The service and associated changes to Geode protect the server from receiving com.gemstone.gemfire packaged objects, translating them to their org.apache.geode counterparts. The service is called OldClientSupportService and the new jar is geode-old-client-support.jar. Though it's called "OldClient" this will also protect the WAN gateways. Several Geode exception classes did not have serialVersionUIDs. Apparently folks thought that abstract superclasses did not need these but this is not the case. I've generated UIDs based on GemFire 8.2.1 classes and put them in place in Geode's classes. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6555c86e Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6555c86e Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6555c86e Branch: refs/heads/feature/e2e-testing Commit: 6555c86ed589e51e206420fbd04bba9b03c7dea0 Parents: b5b7203 Author: Bruce SchuchardtAuthored: Wed Sep 28 15:35:48 2016 -0700 Committer: Bruce Schuchardt Committed: Wed Sep 28 15:42:48 2016 -0700 -- geode-assembly/build.gradle | 4 + .../java/org/apache/geode/CancelException.java | 1 + .../java/org/apache/geode/DataSerializer.java | 36 ++-- .../java/org/apache/geode/GemFireException.java | 1 + .../org/apache/geode/cache/CacheException.java | 2 + .../geode/cache/CacheRuntimeException.java | 3 +- .../geode/cache/OperationAbortedException.java | 3 +- .../geode/cache/RegionExistsException.java | 3 +- .../geode/internal/InternalDataSerializer.java | 131 +--- .../cache/tier/sockets/BaseCommand.java | 31 ++- .../tier/sockets/OldClientSupportService.java | 61 ++ .../internal/cache/wan/BatchException70.java| 34 +--- .../org/apache/geode/pdx/internal/PdxType.java | 10 + .../tier/sockets/command/ContainsKey66Test.java | 2 + .../tier/sockets/command/CreateRegionTest.java | 2 + .../tier/sockets/command/Destroy65Test.java | 2 + .../tier/sockets/command/DestroyRegionTest.java | 2 + .../cache/tier/sockets/command/DestroyTest.java | 2 + .../cache/tier/sockets/command/Get70Test.java | 2 + .../tier/sockets/command/InvalidateTest.java| 2 + .../cache/tier/sockets/command/Put61Test.java | 2 + .../cache/tier/sockets/command/Put65Test.java | 2 + .../cache/tier/sockets/command/PutTest.java | 2 + .../cache/tier/sockets/command/RequestTest.java | 2 + .../sockets/command/UnregisterInterestTest.java | 2 + .../test/dunit/standalone/ProcessManager.java | 28 ++- .../sanctionedDataSerializables.txt | 2 +- .../codeAnalysis/sanctionedSerializables.txt| 10 +- geode-old-client-support/build.gradle | 25 +++ .../com/gemstone/gemfire/GemFireException.java | 150 ++ .../gemfire/OldClientSupportProvider.java | 134 + .../execute/EmtpyRegionFunctionException.java | 65 ++ .../cache/execute/FunctionException.java| 131 .../FunctionInvocationTargetException.java | 93 + ...org.apache.geode.internal.cache.CacheService | 1 + .../gemfire/ClientDataSerializableObject.java | 40 .../gemfire/ClientPDXSerializableObject.java| 34 .../gemfire/ClientSerializableObject.java | 33 +++ .../geode/ClientDataSerializableObject.java | 38 .../geode/ClientPDXSerializableObject.java | 34 .../apache/geode/ClientSerializableObject.java | 33 +++ .../apache/geode/OldClientSupportDUnitTest.java | 200 +++ settings.gradle | 1 + 43 files changed, 1307 insertions(+), 89 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-assembly/build.gradle -- diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle old mode 100755 new mode 100644 index 2b960eb..c46c74a --- a/geode-assembly/build.gradle +++ b/geode-assembly/build.gradle @@ -55,6 +55,7 @@ dependencies { archives project(':geode-json') archives project(':geode-core') archives project(':geode-lucene') + archives project(':geode-old-client-support') archives project(':geode-web') archives project(':geode-web-api') archives project(':geode-pulse') @@ -332,6 +333,9 @@ distributions { from project(":geode-lucene").configurations.runtime from project(":geode-lucene").configurations.archives.allArtifacts.files + +from
[22/38] incubator-geode git commit: GEODE-1945: split and refactor JSSESocketJUnitTest
GEODE-1945: split and refactor JSSESocketJUnitTest The testing for ClientSocketFactory is extracted into the new test ClientSocketFactoryIntegrationTest. Test has been updated to use AssertJ and Rules. The testing for SocketCreatorFactory and SSL is extract into the new test SSLSocketIntegrationTest. Test has been updated to be more readable and to use AssertJ, Awaitility and Rules. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8c7efba8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8c7efba8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8c7efba8 Branch: refs/heads/feature/e2e-testing Commit: 8c7efba86bcc8b6bc7009e75737e591b9f5afc4f Parents: b196015 Author: Kirk LundAuthored: Tue Sep 27 17:09:48 2016 -0700 Committer: Kirk Lund Committed: Wed Sep 28 10:13:54 2016 -0700 -- .../net/ClientSocketFactoryIntegrationTest.java | 100 + .../geode/internal/net/JSSESocketJUnitTest.java | 223 --- .../internal/net/SSLSocketIntegrationTest.java | 184 +++ 3 files changed, 284 insertions(+), 223 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8c7efba8/geode-core/src/test/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java new file mode 100644 index 000..72e5c4f --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java @@ -0,0 +1,100 @@ +/* + * 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 org.apache.geode.internal.net; + +import static org.apache.geode.distributed.ConfigurationProperties.*; +import static org.apache.geode.distributed.internal.DistributionConfig.*; +import static org.apache.geode.internal.security.SecurableCommunicationChannel.*; +import static org.assertj.core.api.Assertions.*; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.Socket; +import java.util.Properties; + +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.contrib.java.lang.system.RestoreSystemProperties; +import org.junit.experimental.categories.Category; + +import org.apache.geode.distributed.ClientSocketFactory; +import org.apache.geode.distributed.internal.DistributionConfig; +import org.apache.geode.distributed.internal.DistributionConfigImpl; +import org.apache.geode.test.junit.categories.IntegrationTest; + +/** + * Integration tests for ClientSocketFactory. + * + * Extracted from {@code JSSESocketJUnitTest}. + */ +@Category(IntegrationTest.class) +public class ClientSocketFactoryIntegrationTest { + + private static final String EXCEPTION_MESSAGE = "TSocketFactory createSocket threw an IOException"; + + private static volatile boolean invokedCreateSocket; + + private Socket socket; + + @Rule + public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties(); + + @Before + public void setUp() throws Exception { +System.setProperty(GEMFIRE_PREFIX + "clientSocketFactory", TSocketFactory.class.getName()); + +Properties properties = new Properties(); +properties.setProperty(CLUSTER_SSL_ENABLED, "false"); +DistributionConfig distributionConfig = new DistributionConfigImpl(properties); + +SocketCreatorFactory.setDistributionConfig(distributionConfig); + } + + @After + public void tearDown() throws Exception { +if (this.socket != null) { + this.socket.close(); +} + +System.clearProperty(GEMFIRE_PREFIX + "clientSocketFactory"); + SocketCreatorFactory.getSocketCreatorForComponent(CLUSTER).initializeClientSocketFactory(); + +invokedCreateSocket = false; + } + + @Test + public void
[25/38] incubator-geode git commit: GEODE-1944: Reevaluation of index regionPath catches EntryDestroyedException
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b5b7203a/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java new file mode 100755 index 000..8f8c8aa --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java @@ -0,0 +1,1567 @@ +/* + * 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 org.apache.geode.cache.query.internal.index; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.Serializable; +import java.text.ParseException; +import java.util.Collection; +import java.util.Iterator; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import org.apache.geode.cache.AttributesFactory; +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.DataPolicy; +import org.apache.geode.cache.EvictionAction; +import org.apache.geode.cache.EvictionAttributes; +import org.apache.geode.cache.PartitionAttributesFactory; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.RegionAttributes; +import org.apache.geode.cache.RegionShortcut; +import org.apache.geode.cache.query.CacheUtils; +import org.apache.geode.cache.query.Index; +import org.apache.geode.cache.query.IndexInvalidException; +import org.apache.geode.cache.query.IndexStatistics; +import org.apache.geode.cache.query.QueryService; +import org.apache.geode.cache.query.SelectResults; +import org.apache.geode.cache.query.data.Portfolio; +import org.apache.geode.cache.query.internal.QueryObserverAdapter; +import org.apache.geode.cache.query.internal.QueryObserverHolder; +import org.apache.geode.test.junit.categories.IntegrationTest; +import org.apache.geode.pdx.PdxInstance; + +@Category(IntegrationTest.class) +public class HashIndexQueryIntegrationTest { + + private QueryService qs; + private Region region; + private Region joinRegion; + private MyQueryObserverAdapter observer; + private Index index; + + @Before + public void setUp() throws java.lang.Exception { +CacheUtils.startCache(); +qs = CacheUtils.getQueryService(); +observer = new MyQueryObserverAdapter(); +QueryObserverHolder.setInstance(observer); + } + + private void createJoinTable(int numEntries) throws Exception { +joinRegion = CacheUtils.createRegion("portfolios2", Portfolio.class); + +for (int i = 0; i < numEntries; i++) { + Portfolio p = new Portfolio(i); + joinRegion.put("" + i, p); +} + } + + @After + public void tearDown() throws java.lang.Exception { +qs.removeIndexes(); +if (joinRegion != null) { + joinRegion.close(); + joinRegion = null; +} +region.close(); +CacheUtils.closeCache(); + } + + /** + * Helper that tests that hash index is used and that it returns the correct result + * @throws Exception + */ + + private void helpTestHashIndexForQuery(String query)throws Exception { +helpTestHashIndexForQuery(query,"p.ID", "/portfolios p"); + } + + private void helpTestHashIndexForQuery(String query, String indexedExpression, String regionPath) throws Exception { +SelectResults nonIndexedResults = (SelectResults)qs.newQuery(query).execute(); +assertFalse(observer.indexUsed); + +index = (Index)qs.createHashIndex("idHash", indexedExpression, regionPath); +SelectResults indexedResults = (SelectResults)qs.newQuery(query).execute(); +assertEquals(nonIndexedResults.size(), indexedResults.size()); +assertTrue(observer.indexUsed); +assertTrue(indexedResults.size() > 0); + } + + private void helpTestHashIndexForQuery(String query, Object[] params, String indexedExpression, String regionPath) throws Exception { +SelectResults nonIndexedResults =
[32/38] incubator-geode git commit: GEODE-1927: Adding missing serialVersionUUIDs to sanctioned list
GEODE-1927: Adding missing serialVersionUUIDs to sanctioned list sanctionedSerializables will missing the serialVersionUUIDs, resulting in a unit test failure. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/93162550 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/93162550 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/93162550 Branch: refs/heads/feature/e2e-testing Commit: 931625506b7b459eefe586c27f3356834d4efdfb Parents: 44427d4 Author: Dan SmithAuthored: Thu Sep 29 14:48:47 2016 -0700 Committer: Dan Smith Committed: Thu Sep 29 14:50:03 2016 -0700 -- .../apache/geode/codeAnalysis/sanctionedSerializables.txt | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/93162550/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt -- diff --git a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt index af7a796..03bb3ea 100644 --- a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt +++ b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt @@ -1,11 +1,11 @@ -org/apache/geode/CancelException,true +org/apache/geode/CancelException,true,3215578659523282642 org/apache/geode/CopyException,true,-1143711608610323585 org/apache/geode/DeltaSerializationException,false org/apache/geode/ForcedDisconnectException,true,4977003259880566257 org/apache/geode/GemFireCacheException,true,-2844020916351682908 org/apache/geode/GemFireCheckedException,false org/apache/geode/GemFireConfigException,true,7791789785331120991 -org/apache/geode/GemFireException,true +org/apache/geode/GemFireException,true,-6972360779789402295 org/apache/geode/GemFireIOException,true,569400935264497 org/apache/geode/GemFireRethrowable,true,8349791552668922571 org/apache/geode/IncompatibleSystemException,true,-6852188720149734350 @@ -53,10 +53,10 @@ org/apache/geode/admin/jmx/internal/RefreshNotificationType,true,437676359239561 org/apache/geode/admin/jmx/internal/StatisticAttributeInfo,true,28022387514935560,stat:org/apache/geode/admin/Statistic org/apache/geode/cache/AttributesFactory$RegionAttributesImpl,true,-3663000883567530374,asyncEventQueueIds:java/util/Set,cacheListeners:java/util/ArrayList,cacheLoader:org/apache/geode/cache/CacheLoader,cacheWriter:org/apache/geode/cache/CacheWriter,compressor:org/apache/geode/compression/Compressor,concurrencyChecksEnabled:boolean,concurrencyLevel:int,customEntryIdleTimeout:org/apache/geode/cache/CustomExpiry,customEntryTimeToLive:org/apache/geode/cache/CustomExpiry,dataPolicy:org/apache/geode/cache/DataPolicy,diskDirs:java/io/File[],diskSizes:int[],diskStoreName:java/lang/String,diskSynchronous:boolean,diskWriteAttributes:org/apache/geode/cache/DiskWriteAttributes,earlyAck:boolean,enableAsyncConflation:boolean,enableSubscriptionConflation:boolean,entryIdleTimeout:int,entryIdleTimeoutExpirationAction:org/apache/geode/cache/ExpirationAction,entryTimeToLive:int,entryTimeToLiveExpirationAction:org/apache/geode/cache/ExpirationAction,evictionAttributes:org/apache/geode/internal/cache/E victionAttributesImpl,gatewaySenderIds:java/util/Set,ignoreJTA:boolean,indexMaintenanceSynchronous:boolean,initialCapacity:int,isBucketRegion:boolean,isCloningEnabled:boolean,isLockGrantor:boolean,keyConstraint:java/lang/Class,loadFactor:float,membershipAttributes:org/apache/geode/cache/MembershipAttributes,multicastEnabled:boolean,offHeap:boolean,partitionAttributes:org/apache/geode/cache/PartitionAttributes,poolName:java/lang/String,publisher:boolean,regionIdleTimeout:int,regionIdleTimeoutExpirationAction:org/apache/geode/cache/ExpirationAction,regionTimeToLive:int,regionTimeToLiveExpirationAction:org/apache/geode/cache/ExpirationAction,scope:org/apache/geode/cache/Scope,statisticsEnabled:boolean,subscriptionAttributes:org/apache/geode/cache/SubscriptionAttributes,valueConstraint:java/lang/Class org/apache/geode/cache/CacheClosedException,true,-6479561694497811262 -org/apache/geode/cache/CacheException,true +org/apache/geode/cache/CacheException,true,7699432887938858940 org/apache/geode/cache/CacheExistsException,true,4090002289325418100 org/apache/geode/cache/CacheLoaderException,true,-3383072059406642140 -org/apache/geode/cache/CacheRuntimeException,true +org/apache/geode/cache/CacheRuntimeException,true,6750107573015376688 org/apache/geode/cache/CacheWriterException,true,-2872212342970454458
[29/38] incubator-geode git commit: GEODE-1921: Redis adaptor Strings region has incorrect attributes
GEODE-1921: Redis adaptor Strings region has incorrect attributes - renamed them to redis_strings and redis_hll - made the strings regions and the hll region PARTITION by default - these regions are no longer internal regions Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c9790a43 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c9790a43 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c9790a43 Branch: refs/heads/feature/e2e-testing Commit: c9790a4343718df40e9374bbc49d99782067913e Parents: 6555c86 Author: Swapnil BawaskarAuthored: Wed Sep 21 23:47:20 2016 -0700 Committer: Swapnil Bawaskar Committed: Wed Sep 28 16:17:50 2016 -0700 -- .../apache/geode/redis/GeodeRedisServer.java| 28 +++ .../org/apache/geode/redis/RedisServerTest.java | 84 2 files changed, 94 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c9790a43/geode-core/src/main/java/org/apache/geode/redis/GeodeRedisServer.java -- diff --git a/geode-core/src/main/java/org/apache/geode/redis/GeodeRedisServer.java b/geode-core/src/main/java/org/apache/geode/redis/GeodeRedisServer.java index 45d1886..d86d7fe 100644 --- a/geode-core/src/main/java/org/apache/geode/redis/GeodeRedisServer.java +++ b/geode-core/src/main/java/org/apache/geode/redis/GeodeRedisServer.java @@ -47,6 +47,7 @@ import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.channel.socket.oio.OioServerSocketChannel; import io.netty.util.concurrent.Future; +import org.apache.geode.cache.*; import org.apache.geode.redis.internal.ByteArrayWrapper; import org.apache.geode.redis.internal.ByteToCommandDecoder; import org.apache.geode.redis.internal.Coder; @@ -56,16 +57,6 @@ import org.apache.geode.redis.internal.RegionProvider; import org.apache.geode.InternalGemFireError; import org.apache.geode.LogWriter; -import org.apache.geode.cache.AttributesFactory; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.DataPolicy; -import org.apache.geode.cache.EntryEvent; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionAttributes; -import org.apache.geode.cache.RegionDestroyedException; -import org.apache.geode.cache.RegionShortcut; -import org.apache.geode.cache.Scope; import org.apache.geode.cache.util.CacheListenerAdapter; import org.apache.geode.distributed.internal.InternalDistributedSystem; import org.apache.geode.internal.cache.GemFireCacheImpl; @@ -231,13 +222,13 @@ public class GeodeRedisServer { * The field that defines the name of the {@link Region} which holds all of * the strings. The current value of this field is {@value #STRING_REGION}. */ - public static final String STRING_REGION = "__StRiNgS"; + public static final String STRING_REGION = "ReDiS_StRiNgS"; /** * The field that defines the name of the {@link Region} which holds all of * the HyperLogLogs. The current value of this field is {@value #HLL_REGION}. */ - public static final String HLL_REGION = "__HlL"; + public static final String HLL_REGION = "ReDiS_HlL"; /** * The field that defines the name of the {@link Region} which holds all of @@ -425,23 +416,24 @@ public class GeodeRedisServer { private void initializeRedis() { synchronized (this.cache) { Region stringsRegion; - InternalRegionArguments ira = new InternalRegionArguments().setInternalRegion(true); - AttributesFactory af = new AttributesFactory(); - af.setScope(Scope.LOCAL); - RegionAttributes ra = af.create(); + Region hLLRegion; Region redisMetaData; GemFireCacheImpl gemFireCache = (GemFireCacheImpl) cache; try { if ((stringsRegion = cache.getRegion(STRING_REGION)) == null) { - stringsRegion = gemFireCache.createVMRegion(GeodeRedisServer.STRING_REGION, ra, ira); + RegionFactory regionFactory = gemFireCache.createRegionFactory(this.DEFAULT_REGION_TYPE); + stringsRegion = regionFactory.create(STRING_REGION); } if ((hLLRegion = cache.getRegion(HLL_REGION)) == null) { - hLLRegion = gemFireCache.createVMRegion(HLL_REGION, ra, ira); + RegionFactory regionFactory = gemFireCache.createRegionFactory(this.DEFAULT_REGION_TYPE); + hLLRegion = regionFactory.create(HLL_REGION); } if ((redisMetaData =
[38/38] incubator-geode git commit: Basic get/put test
Basic get/put test Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/75521268 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/75521268 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/75521268 Branch: refs/heads/feature/e2e-testing Commit: 75521268a535c1cc9fff3b0245e5cd1af84665cc Parents: 2cec7a6 Author: Jens DeppeAuthored: Tue Oct 4 10:02:50 2016 -0700 Committer: Jens Deppe Committed: Tue Oct 4 10:02:50 2016 -0700 -- .../java/org/apache/geode/e2e/DockerTest.java | 8 +- .../test/java/org/apache/geode/e2e/GetPut.java | 32 +++ .../java/org/apache/geode/e2e/GetPutSteps.java | 71 ++ .../java/org/apache/geode/e2e/StoryRunner.java | 47 ++ .../geode/e2e/container/DockerCluster.java | 97 .../geode/e2e/container/ResultCallback.java | 6 ++ .../org/apache/geode/e2e/get_put.story | 5 + gradle/test.gradle | 1 + 8 files changed, 245 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/75521268/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java b/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java index e8e04f0..d8581f4 100644 --- a/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java +++ b/geode-core/src/test/java/org/apache/geode/e2e/DockerTest.java @@ -14,7 +14,9 @@ public class DockerTest { @Before public void setup() throws Exception { -cluster = new DockerCluster("testy", 1); +cluster = new DockerCluster("testy"); +cluster.setLocatorCount(1); +cluster.setServerCount(2); } @After @@ -25,11 +27,11 @@ public class DockerTest { @Test public void sanity() throws Exception { cluster.start(); -assertNotNull("Locator address is null", cluster.getLocatorAddress()); +assertNotNull("Locator host is null", cluster.getLocatorHost()); } @Test - public void testInvalidGfshCommand() throws Exception { + public void testInvalidGfshCommandReturnsNonZero() throws Exception { String id = cluster.startContainer(0); int r = cluster.execCommand(id, false, null, new String[] { "/tmp/work/bin/gfsh", "startx" }); assertEquals(1, r); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/75521268/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java b/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java new file mode 100644 index 000..e62194b --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/e2e/GetPut.java @@ -0,0 +1,32 @@ +package org.apache.geode.e2e; + +import org.jbehave.core.configuration.Configuration; +import org.jbehave.core.configuration.MostUsefulConfiguration; +import org.jbehave.core.io.LoadFromClasspath; +import org.jbehave.core.junit.JUnitStory; +import org.jbehave.core.reporters.Format; +import org.jbehave.core.reporters.StoryReporterBuilder; +import org.jbehave.core.steps.InjectableStepsFactory; +import org.jbehave.core.steps.InstanceStepsFactory; + +public class GetPut extends JUnitStory { + + // Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is need ed + @Override + public Configuration configuration() { +return new MostUsefulConfiguration() + // where to find the stories + .useStoryLoader(new LoadFromClasspath(this.getClass())) + // CONSOLE and TXT reporting + .useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats() + .withFormats(Format.ANSI_CONSOLE, Format.TXT)); + } + + // Here we specify the steps classes + @Override + public InjectableStepsFactory stepsFactory() { +// varargs, can have more that one steps classes +return new InstanceStepsFactory(configuration(), new GetPutSteps()); + } + +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/75521268/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java -- diff --git a/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java new file mode 100644 index 000..bb4db31 --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/e2e/GetPutSteps.java @@ -0,0 +1,71 @@ +package org.apache.geode.e2e; + +import static org.junit.Assert.assertEquals; + +import com.spotify.docker.client.exceptions.DockerException; +import
[33/38] incubator-geode git commit: GEODE-1949: Remove the dependency on quartz from the rebalancer
GEODE-1949: Remove the dependency on quartz from the rebalancer The geode-rebalancer does not need to depend on quartz, it is using spring-expression for all of the cron heavy lifting. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/22afc3bd Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/22afc3bd Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/22afc3bd Branch: refs/heads/feature/e2e-testing Commit: 22afc3bd740241e53444dec2fd30ea39fa15c5dc Parents: 9316255 Author: Dan SmithAuthored: Thu Sep 29 10:33:17 2016 -0700 Committer: Dan Smith Committed: Thu Sep 29 14:50:03 2016 -0700 -- geode-rebalancer/build.gradle| 8 .../java/org/apache/geode/cache/util/AutoBalancer.java | 11 +++ 2 files changed, 11 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/22afc3bd/geode-rebalancer/build.gradle -- diff --git a/geode-rebalancer/build.gradle b/geode-rebalancer/build.gradle index 00c43e4..cf129a5 100644 --- a/geode-rebalancer/build.gradle +++ b/geode-rebalancer/build.gradle @@ -19,10 +19,10 @@ dependencies { provided project(':geode-common') provided project(':geode-core') - compile ('org.quartz-scheduler:quartz:' + project.'quartz.version') { -exclude module: 'c3p0' -exclude module: 'slf4j-api' + compile ('org.springframework:spring-context:' + project.'springframework.version') { +exclude module: 'spring-beans' +exclude module: 'spring-expression' +exclude module: 'spring-aop' } - compile ('org.springframework:spring-context:' + project.'springframework.version') testCompile project(':geode-junit') } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/22afc3bd/geode-rebalancer/src/main/java/org/apache/geode/cache/util/AutoBalancer.java -- diff --git a/geode-rebalancer/src/main/java/org/apache/geode/cache/util/AutoBalancer.java b/geode-rebalancer/src/main/java/org/apache/geode/cache/util/AutoBalancer.java index 98c5237..b95b99e 100644 --- a/geode-rebalancer/src/main/java/org/apache/geode/cache/util/AutoBalancer.java +++ b/geode-rebalancer/src/main/java/org/apache/geode/cache/util/AutoBalancer.java @@ -28,8 +28,8 @@ import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; +import org.apache.geode.annotations.Experimental; import org.apache.logging.log4j.Logger; -import org.quartz.CronExpression; import org.springframework.scheduling.support.CronSequenceGenerator; import org.apache.geode.GemFireConfigException; @@ -72,6 +72,7 @@ import org.apache.geode.internal.logging.LogService; * TBD THRESHOLDS * */ +@Experimental("The autobalancer may be removed or the API may change in future releases") public class AutoBalancer implements Declarable { /** * Use this configuration to manage out-of-balance audit frequency. If the @@ -202,10 +203,12 @@ public class AutoBalancer implements Declarable { if (schedule == null || schedule.isEmpty()) { throw new GemFireConfigException("Missing configuration: " + SCHEDULE); } - if (!CronExpression.isValidExpression(schedule)) { -throw new GemFireConfigException("Invalid schedule: " + schedule); + + try { +generator = new CronSequenceGenerator(schedule); + } catch(Exception e) { +throw new GemFireConfigException("Cron expression could not be parsed: " + schedule, e); } - generator = new CronSequenceGenerator(schedule); submitNext(); }
[31/38] incubator-geode git commit: GEODE-1675: updating context-fragment to point to the new tomcat 8.5 listener
GEODE-1675: updating context-fragment to point to the new tomcat 8.5 listener Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/44427d4e Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/44427d4e Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/44427d4e Branch: refs/heads/feature/e2e-testing Commit: 44427d4e9e68285001363527c2c063128e6e763c Parents: f686e9e Author: Jason HuynhAuthored: Wed Sep 28 13:25:53 2016 -0700 Committer: Jason Huynh Committed: Wed Sep 28 16:37:37 2016 -0700 -- .../release/tcserver/geode-cs-tomcat-8/context-fragment.xml| 2 +- .../release/tcserver/geode-p2p-tomcat-8/context-fragment.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44427d4e/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml -- diff --git a/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml b/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml index b7ad94e..c8ff83d 100644 --- a/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml +++ b/extensions/geode-modules-assembly/release/tcserver/geode-cs-tomcat-8/context-fragment.xml @@ -3,7 +3,7 @@ -http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44427d4e/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml -- diff --git a/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml b/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml index 252fa8f..48bfcbb 100644 --- a/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml +++ b/extensions/geode-modules-assembly/release/tcserver/geode-p2p-tomcat-8/context-fragment.xml @@ -3,7 +3,7 @@ -
[23/38] incubator-geode git commit: GEODE-1941: Added tests for SSL config for SocketFactory
GEODE-1941: Added tests for SSL config for SocketFactory Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/7254cf3f Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/7254cf3f Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/7254cf3f Branch: refs/heads/feature/e2e-testing Commit: 7254cf3fb0ceb2255650d96f2b0ed615118ef700 Parents: 8c7efba Author: Udo KohlmeyerAuthored: Thu Sep 29 04:52:54 2016 +1000 Committer: Udo Kohlmeyer Committed: Thu Sep 29 04:52:54 2016 +1000 -- .../net/SocketCreatorFactoryJUnitTest.java | 340 +-- 1 file changed, 237 insertions(+), 103 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7254cf3f/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java index 7405eae..232eb61 100644 --- a/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorFactoryJUnitTest.java @@ -17,169 +17,168 @@ package org.apache.geode.internal.net; import static org.apache.geode.distributed.ConfigurationProperties.*; -import static org.apache.geode.internal.net.SocketCreatorFactory.*; -import static org.apache.geode.internal.security.SecurableCommunicationChannel.*; import static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.util.Properties; +import org.apache.geode.internal.security.SecurableCommunicationChannel; +import org.apache.geode.test.junit.categories.UnitTest; import org.junit.After; import org.junit.Test; import org.junit.experimental.categories.Category; import org.apache.geode.distributed.internal.DistributionConfigImpl; -import org.apache.geode.test.junit.categories.IntegrationTest; import org.apache.geode.util.test.TestUtil; -@Category(IntegrationTest.class) +@Category(UnitTest.class) public class SocketCreatorFactoryJUnitTest { @After public void tearDown() throws Exception { -close(); +SocketCreatorFactory.close(); } @Test public void testNewSSLConfigSSLComponentLocator() throws Exception { -Properties properties = configureSSLProperties(LOCATOR.getConstant()); +Properties properties = configureSSLProperties(SecurableCommunicationChannel.LOCATOR.getConstant()); DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties); -setDistributionConfig(distributionConfig); - -assertTrue(getSocketCreatorForComponent(LOCATOR).useSSL()); -assertFalse(getSocketCreatorForComponent(CLUSTER).useSSL()); -assertFalse(getSocketCreatorForComponent(GATEWAY).useSSL()); -assertFalse(getSocketCreatorForComponent(JMX).useSSL()); -assertFalse(getSocketCreatorForComponent(SERVER).useSSL()); -assertFalse(getSocketCreatorForComponent(WEB).useSSL()); +SocketCreatorFactory.setDistributionConfig(distributionConfig); + + assertTrue(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR).useSSL()); + assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).useSSL()); + assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.GATEWAY).useSSL()); + assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.JMX).useSSL()); + assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.SERVER).useSSL()); + assertFalse(SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.WEB).useSSL()); } @Test public void testNewSSLConfigSSLComponentALL() throws Exception { -Properties properties = configureSSLProperties(ALL.getConstant()); +Properties properties = configureSSLProperties(SecurableCommunicationChannel.ALL.getConstant()); DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties); -setDistributionConfig(distributionConfig); - -assertTrue(getSocketCreatorForComponent(CLUSTER).useSSL()); -assertTrue(getSocketCreatorForComponent(LOCATOR).useSSL()); -assertTrue(getSocketCreatorForComponent(GATEWAY).useSSL()); -assertTrue(getSocketCreatorForComponent(JMX).useSSL()); -assertTrue(getSocketCreatorForComponent(SERVER).useSSL()); -assertTrue(getSocketCreatorForComponent(WEB).useSSL()); +
[27/38] incubator-geode git commit: GEODE-1927: add support for old GemFire remote sites (WAN)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientPDXSerializableObject.java -- diff --git a/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientPDXSerializableObject.java b/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientPDXSerializableObject.java new file mode 100644 index 000..99c2308 --- /dev/null +++ b/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientPDXSerializableObject.java @@ -0,0 +1,34 @@ +/* + * 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; + +import org.apache.geode.pdx.PdxReader; +import org.apache.geode.pdx.PdxSerializable; +import org.apache.geode.pdx.PdxWriter; + +public class ClientPDXSerializableObject implements PdxSerializable { + + @Override + public void toData(final PdxWriter writer) { + + } + + @Override + public void fromData(final PdxReader reader) { + + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientSerializableObject.java -- diff --git a/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientSerializableObject.java b/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientSerializableObject.java new file mode 100644 index 000..a375358 --- /dev/null +++ b/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientSerializableObject.java @@ -0,0 +1,33 @@ +/* + * 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; + +public class ClientSerializableObject implements java.io.Serializable { + public static final long serialVersionUID = 1L; + + private ClientSerializableObject subObject; + + public ClientSerializableObject() { + } + + public void setSubObject(ClientSerializableObject object) { +subObject = object; + } + public ClientSerializableObject getSubObject() { +return subObject; + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/test/java/org/apache/geode/ClientDataSerializableObject.java -- diff --git a/geode-old-client-support/src/test/java/org/apache/geode/ClientDataSerializableObject.java b/geode-old-client-support/src/test/java/org/apache/geode/ClientDataSerializableObject.java new file mode 100644 index 000..f0e4a4a --- /dev/null +++ b/geode-old-client-support/src/test/java/org/apache/geode/ClientDataSerializableObject.java @@ -0,0 +1,38 @@ +/* + * 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
[24/38] incubator-geode git commit: GEODE-1947: Renaming of SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION to SSL_WEB_SERVICE_REQUIRE_AUTHENTICATION
GEODE-1947: Renaming of SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION to SSL_WEB_SERVICE_REQUIRE_AUTHENTICATION Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/61d3ec3c Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/61d3ec3c Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/61d3ec3c Branch: refs/heads/feature/e2e-testing Commit: 61d3ec3c05d13d5f3b8895a9141b59ddc8cb7248 Parents: 7254cf3 Author: Udo KohlmeyerAuthored: Thu Sep 29 05:10:35 2016 +1000 Committer: Udo Kohlmeyer Committed: Thu Sep 29 05:10:35 2016 +1000 -- .../web/controllers/RestAPIsWithSSLDUnitTest.java | 8 .../distributed/ConfigurationProperties.java | 6 +++--- .../internal/AbstractDistributionConfig.java | 2 +- .../distributed/internal/DistributionConfig.java | 18 +- .../internal/DistributionConfigImpl.java | 16 .../internal/net/SSLConfigurationFactory.java | 2 +- .../geode/management/GemFireProperties.java | 10 +- .../management/internal/beans/BeanUtilFuncs.java | 2 +- .../net/SSLConfigurationFactoryJUnitTest.java | 13 ++--- 9 files changed, 38 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/61d3ec3c/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java -- diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java index cd6b590..fde41f1 100644 --- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java +++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java @@ -325,7 +325,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase { sslPropertyConverter(sslProperties, props, SSL_TRUSTSTORE_PASSWORD, null); sslPropertyConverter(sslProperties, props, SSL_WEB_ALIAS, null); sslPropertyConverter(sslProperties, props, SSL_ENABLED_COMPONENTS, null); - sslPropertyConverter(sslProperties, props, SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, null); + sslPropertyConverter(sslProperties, props, SSL_WEB_SERVICE_REQUIRE_AUTHENTICATION, null); sslPropertyConverter(sslProperties, props, SSL_DEFAULT_ALIAS, null); } return props; @@ -497,7 +497,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase { props.setProperty(SSL_KEYSTORE_TYPE, "JKS"); props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant()); props.setProperty(SSL_WEB_ALIAS, "httpservicekey"); -props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true"); +props.setProperty(SSL_WEB_SERVICE_REQUIRE_AUTHENTICATION, "true"); String restEndpoint = startInfraWithSSL(props, false); validateConnection(restEndpoint, "SSL", props); } @@ -512,7 +512,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase { props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password"); props.setProperty(SSL_KEYSTORE_TYPE, "JKS"); props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant()); -props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true"); +props.setProperty(SSL_WEB_SERVICE_REQUIRE_AUTHENTICATION, "true"); props.setProperty(SSL_WEB_ALIAS, "httpservicekey"); props.setProperty(INVALID_CLIENT_ALIAS, "someAlias"); String restEndpoint = startInfraWithSSL(props, false); @@ -663,7 +663,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase { props.setProperty(SSL_KEYSTORE_TYPE, "JKS"); props.setProperty(SSL_PROTOCOLS, "SSL"); props.setProperty(SSL_REQUIRE_AUTHENTICATION, "true"); -props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true"); +props.setProperty(SSL_WEB_SERVICE_REQUIRE_AUTHENTICATION, "true"); props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant()); String restEndpoint = startInfraWithSSL(props, false); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/61d3ec3c/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java -- diff --git a/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java b/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java index 66b1472..08f79b9 100644 ---
[13/38] incubator-geode git commit: GEODE-1937: Fixing failures from the example tests
GEODE-1937: Fixing failures from the example tests Setting a default GEODE_HOME to use when running example tests. Fixing the example tests scripts to indicate that they are bash scripts as the first line in the header. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/62bd240f Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/62bd240f Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/62bd240f Branch: refs/heads/feature/e2e-testing Commit: 62bd240f28258620e5140d52ce21c2004598f7ea Parents: 55a6584 Author: Dan SmithAuthored: Mon Sep 26 11:03:25 2016 -0700 Committer: Dan Smith Committed: Tue Sep 27 10:43:56 2016 -0700 -- geode-examples/build.gradle| 6 ++ geode-examples/replicated/scripts/pidkiller.sh | 5 ++--- geode-examples/replicated/scripts/setEnv.sh| 2 +- geode-examples/replicated/scripts/startAll.sh | 2 +- geode-examples/replicated/scripts/stopAll.sh | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/build.gradle -- diff --git a/geode-examples/build.gradle b/geode-examples/build.gradle index 1eadc31..1e638bc 100644 --- a/geode-examples/build.gradle +++ b/geode-examples/build.gradle @@ -48,6 +48,12 @@ subprojects { } } +test { + def geodeHome = System.getenv('GEODE_HOME'); + geodeHome = geodeHome != null ? geodeHome : file('../../geode-assembly/build/install/apache-geode/').absolutePath + environment 'GEODE_HOME': geodeHome +} + } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/pidkiller.sh -- diff --git a/geode-examples/replicated/scripts/pidkiller.sh b/geode-examples/replicated/scripts/pidkiller.sh index 1a3eaf2..ecf8f2d 100755 --- a/geode-examples/replicated/scripts/pidkiller.sh +++ b/geode-examples/replicated/scripts/pidkiller.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,9 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash -# -# @brief Script that look for .pid files on a directory and kill those processes. +# @brief Script that look for .pid files on a directory and kill those processes. # export DIR=$1 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/setEnv.sh -- diff --git a/geode-examples/replicated/scripts/setEnv.sh b/geode-examples/replicated/scripts/setEnv.sh index 60befc6..e9e860e 100755 --- a/geode-examples/replicated/scripts/setEnv.sh +++ b/geode-examples/replicated/scripts/setEnv.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash ## check if locator port has been set otherwise set to default export GEODE_LOCATOR_PORT="${GEODE_LOCATOR_PORT:-10334}" http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/startAll.sh -- diff --git a/geode-examples/replicated/scripts/startAll.sh b/geode-examples/replicated/scripts/startAll.sh index f4ce413..2b08f19 100755 --- a/geode-examples/replicated/scripts/startAll.sh +++ b/geode-examples/replicated/scripts/startAll.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash set -e http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/stopAll.sh -- diff --git a/geode-examples/replicated/scripts/stopAll.sh b/geode-examples/replicated/scripts/stopAll.sh index 2a2c39b..a6364a8 100755 --- a/geode-examples/replicated/scripts/stopAll.sh +++ b/geode-examples/replicated/scripts/stopAll.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more
[16/38] incubator-geode git commit: GEODE-1769: add the ignored exception to the AbstractSecureServerDUnitTest
GEODE-1769: add the ignored exception to the AbstractSecureServerDUnitTest Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1890e60e Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1890e60e Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1890e60e Branch: refs/heads/feature/e2e-testing Commit: 1890e60e231767d6e94712483e29cd86a68ce51b Parents: ddf4f3d Author: Jinmei LiaoAuthored: Tue Sep 27 11:00:14 2016 -0700 Committer: Jinmei Liao Committed: Tue Sep 27 14:04:42 2016 -0700 -- .../apache/geode/security/AbstractSecureServerDUnitTest.java | 7 +-- .../IntegratedClientRegisterInterestAuthDistributedTest.java | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1890e60e/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java b/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java index 23b851a..435b426 100644 --- a/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java @@ -24,7 +24,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Properties; -import org.apache.geode.security.templates.SampleSecurityManager; import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.junit.Before; @@ -36,9 +35,11 @@ import org.apache.geode.cache.client.ClientCache; import org.apache.geode.cache.client.ClientCacheFactory; import org.apache.geode.cache.client.ClientRegionShortcut; import org.apache.geode.cache.server.CacheServer; -import org.apache.geode.distributed.*; +import org.apache.geode.distributed.ConfigurationProperties; +import org.apache.geode.security.templates.SampleSecurityManager; import org.apache.geode.security.templates.UserPasswordAuthInit; import org.apache.geode.test.dunit.Host; +import org.apache.geode.test.dunit.IgnoredException; import org.apache.geode.test.dunit.Invoke; import org.apache.geode.test.dunit.VM; import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase; @@ -69,6 +70,8 @@ public class AbstractSecureServerDUnitTest extends JUnit4CacheTestCase { @Before public void before() throws Exception { +IgnoredException.addIgnoredException("No longer connected to localhost"); + final Host host = Host.getHost(0); this.client1 = host.getVM(1); this.client2 = host.getVM(2); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1890e60e/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java b/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java index f897b5e..d066e9d 100644 --- a/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java +++ b/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java @@ -32,7 +32,6 @@ import org.apache.geode.test.junit.categories.SecurityTest; @Category({ DistributedTest.class, SecurityTest.class }) public class IntegratedClientRegisterInterestAuthDistributedTest extends AbstractSecureServerDUnitTest { - @Test public void testRegisterInterest() throws InterruptedException { // client1 connects to server as a user not authorized to do any operations
[08/38] incubator-geode git commit: Fixing the version of geode the examples are trying to build against
Fixing the version of geode the examples are trying to build against The examples were still pointing at the M3 snapshot. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6555c312 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6555c312 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6555c312 Branch: refs/heads/feature/e2e-testing Commit: 6555c31203d5adfacaf4b6f5074db208f6f169a8 Parents: da93506 Author: Dan SmithAuthored: Mon Sep 26 10:09:20 2016 -0700 Committer: Dan Smith Committed: Mon Sep 26 10:09:20 2016 -0700 -- geode-examples/gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c312/geode-examples/gradle.properties -- diff --git a/geode-examples/gradle.properties b/geode-examples/gradle.properties index 9c7822a..7aa1ef9 100644 --- a/geode-examples/gradle.properties +++ b/geode-examples/gradle.properties @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -geodeVersion = 1.0.0-incubating.M3-SNAPSHOT +geodeVersion = 1.0.0-incubating-SNAPSHOT junitVersion = 4.12 mockitocoreVersion = 1.10.19 commonsExecVersion = 1.3 -awaitilityVersion = 1.7.0 \ No newline at end of file +awaitilityVersion = 1.7.0
[03/38] incubator-geode git commit: GEODE-1894: there's a race that AckReader thred is reading for ack (hold the read lock), while stopping sender thread tried to hold the write lock.
GEODE-1894: there's a race that AckReader thred is reading for ack (hold the read lock), while stopping sender thread tried to hold the write lock. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a1938b38 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a1938b38 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a1938b38 Branch: refs/heads/feature/e2e-testing Commit: a1938b386f1ed9064529df7f4206af913d4461c2 Parents: 4f2e277 Author: zhouxhAuthored: Fri Sep 23 10:02:21 2016 -0700 Committer: zhouxh Committed: Fri Sep 23 10:02:21 2016 -0700 -- .../internal/cache/wan/GatewaySenderEventRemoteDispatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a1938b38/geode-wan/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java -- diff --git a/geode-wan/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java b/geode-wan/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java index 6beb0ee..da94f65 100644 --- a/geode-wan/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java +++ b/geode-wan/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java @@ -98,7 +98,7 @@ public class GatewaySenderEventRemoteDispatcher implements } this.connectionLifeCycleLock.readLock().lock(); try { -if (connection != null) { +if (connection != null && !processor.isStopped()) { ack = (GatewayAck)sp.receiveAckFromReceiver(connection); } } finally {
[18/38] incubator-geode git commit: GEODE-1937: Don't use a relative path to the geode-examples location
GEODE-1937: Don't use a relative path to the geode-examples location Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0ad18488 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0ad18488 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0ad18488 Branch: refs/heads/feature/e2e-testing Commit: 0ad18488b800f34cca41cab022948ef3355d73d7 Parents: 1890e60 Author: Dan SmithAuthored: Tue Sep 27 16:10:46 2016 -0700 Committer: Dan Smith Committed: Tue Sep 27 16:11:52 2016 -0700 -- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ad18488/build.gradle -- diff --git a/build.gradle b/build.gradle index b360c40..bc31c92 100755 --- a/build.gradle +++ b/build.gradle @@ -87,13 +87,13 @@ subprojects { } task cleanExamples(type: GradleBuild) { - buildFile = 'geode-examples/build.gradle' + buildFile = "${rootProject.projectDir}/geode-examples/build.gradle" tasks = ['clean'] } clean.dependsOn cleanExamples task buildExamples(type: GradleBuild, dependsOn: ':geode-assembly:installDist') { - buildFile = 'geode-examples/build.gradle' + buildFile = "${rootProject.projectDir}/geode-examples/build.gradle" tasks = ['build'] }
[11/38] incubator-geode git commit: GEODE-1885: fix infinite loop
GEODE-1885: fix infinite loop The previous fix for GEODE-1885 introduced a hang on off-heap regions. If a concurrent close/destroy of the region happens while other threads are modifying it then the thread doing the modification can get stuck in a hot loop that never terminates. The hot loop is in AbstractRegionMap when it tests the existing region entry it finds to see if it can be modified. If the region entry has a value that says it is removed then the operation spins around and tries again. It expects the thread that marked it as being removed to also remove it from the map. The previous fix for GEODE-1885 can cause a remove to not happen. So this fix does two things: 1. On retry remove the existing removed region entry from the map. 2. putEntryIfAbsent now only releases the current entry if it has an off-heap reference. This prevents an infinite loop that was caused by the current thread who just added a new entry with REMOVE_PHASE1 from releasing it (changing it to REMOVE_PHASE2) because it sees that the region is closed/destroyed. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/55a65840 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/55a65840 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/55a65840 Branch: refs/heads/feature/e2e-testing Commit: 55a65840a4e4d427acaed1182aca869bf92ecae6 Parents: 6555c31 Author: Darrel SchneiderAuthored: Fri Sep 23 10:53:35 2016 -0700 Committer: Darrel Schneider Committed: Mon Sep 26 14:43:12 2016 -0700 -- .../geode/internal/cache/AbstractRegionMap.java | 59 ++-- 1 file changed, 30 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/55a65840/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java -- diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java index 33e98b6..5861e9a 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java @@ -48,6 +48,7 @@ import org.apache.geode.internal.logging.log4j.LogMarker; import org.apache.geode.internal.offheap.OffHeapHelper; import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper; import org.apache.geode.internal.offheap.ReferenceCountHelper; +import org.apache.geode.internal.offheap.StoredObject; import org.apache.geode.internal.offheap.annotations.Released; import org.apache.geode.internal.offheap.annotations.Retained; import org.apache.geode.internal.offheap.annotations.Unretained; @@ -246,15 +247,19 @@ public abstract class AbstractRegionMap implements RegionMap { public final RegionEntry putEntryIfAbsent(Object key, RegionEntry re) { -RegionEntry value = (RegionEntry)_getMap().putIfAbsent(key, re); -if (value == null && (re instanceof OffHeapRegionEntry) +RegionEntry oldRe = (RegionEntry)_getMap().putIfAbsent(key, re); +if (oldRe == null && (re instanceof OffHeapRegionEntry) && _isOwnerALocalRegion() && _getOwner().isThisRegionBeingClosedOrDestroyed()) { // prevent orphan during concurrent destroy (#48068) - if (_getMap().remove(key, re)) { -((OffHeapRegionEntry)re).release(); + Object v = re._getValue(); + if (v != Token.REMOVED_PHASE1 && v != Token.REMOVED_PHASE2 + && v instanceof StoredObject && ((StoredObject)v).hasRefCount()) { +if (_getMap().remove(key, re)) { + ((OffHeapRegionEntry)re).release(); +} } } -return value; +return oldRe; } @Override @@ -640,12 +645,11 @@ public abstract class AbstractRegionMap implements RegionMap { while (oldRe != null) { synchronized (oldRe) { if (oldRe.isRemoved() && !oldRe.isTombstone()) { -oldRe = putEntryIfAbsent(key, newRe); -if (oldRe != null) { - if (_isOwnerALocalRegion()) { -_getOwner().getCachePerfStats().incRetries(); - } +if (_isOwnerALocalRegion()) { + _getOwner().getCachePerfStats().incRetries(); } +_getMap().remove(key, oldRe); +oldRe = putEntryIfAbsent(key, newRe); } /* * Entry already exists which should be impossible. @@ -844,10 +848,9 @@ public abstract class AbstractRegionMap implements RegionMap { while (!done && oldRe != null) { synchronized (oldRe) { if
[14/38] incubator-geode git commit: GEODE-1940: increase line length to prevent line-wrapping
GEODE-1940: increase line length to prevent line-wrapping Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9f422dd3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9f422dd3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9f422dd3 Branch: refs/heads/feature/e2e-testing Commit: 9f422dd39ac5311db26431fb96e5adfc32546119 Parents: 8a6a46a Author: Kirk LundAuthored: Tue Sep 27 12:48:24 2016 -0700 Committer: Kirk Lund Committed: Tue Sep 27 13:54:39 2016 -0700 -- etc/eclipseFormatterProfile.xml | 2 +- etc/intellijIdeaCodeStyle.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f422dd3/etc/eclipseFormatterProfile.xml -- diff --git a/etc/eclipseFormatterProfile.xml b/etc/eclipseFormatterProfile.xml index ead2f39..b9f8410 100755 --- a/etc/eclipseFormatterProfile.xml +++ b/etc/eclipseFormatterProfile.xml @@ -288,7 +288,7 @@ - + http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f422dd3/etc/intellijIdeaCodeStyle.xml -- diff --git a/etc/intellijIdeaCodeStyle.xml b/etc/intellijIdeaCodeStyle.xml index 5b01917..0b5c31b 100755 --- a/etc/intellijIdeaCodeStyle.xml +++ b/etc/intellijIdeaCodeStyle.xml @@ -60,6 +60,7 @@ + @@ -82,6 +83,7 @@ +
[02/38] incubator-geode git commit: GEODE-1915: Prevent deadlock registering instantiators with gateways
GEODE-1915: Prevent deadlock registering instantiators with gateways Don't hold a lock while distributing instantiators. This prevents the deadlock because incoming registrations won't wait for registrations that are being distributed. This change might cause instantiators to be distributed in a different order that they were registered in, but that's ok because the order in which different instantiators are registered is not important. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4f2e2774 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4f2e2774 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4f2e2774 Branch: refs/heads/feature/e2e-testing Commit: 4f2e27749b0f9e94d0bfe7399fddbe1e9041ecdb Parents: 331fc17 Author: Dan SmithAuthored: Tue Sep 20 18:00:34 2016 -0700 Committer: Dan Smith Committed: Thu Sep 22 12:13:40 2016 -0700 -- .../geode/internal/InternalInstantiator.java| 71 +++-- .../geode/internal/cache/wan/WANTestBase.java | 28 ++--- .../SerialGatewaySenderOperationsDUnitTest.java | 106 ++- 3 files changed, 160 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4f2e2774/geode-core/src/main/java/org/apache/geode/internal/InternalInstantiator.java -- diff --git a/geode-core/src/main/java/org/apache/geode/internal/InternalInstantiator.java b/geode-core/src/main/java/org/apache/geode/internal/InternalInstantiator.java index bb15097..b985885 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/InternalInstantiator.java +++ b/geode-core/src/main/java/org/apache/geode/internal/InternalInstantiator.java @@ -88,7 +88,7 @@ public class InternalInstantiator { * Registers an Instantiator with the data * serialization framework. */ - public static synchronized void register(Instantiator instantiator, + public static void register(Instantiator instantiator, boolean distribute) { // [sumedh] Skip the checkForThread() check if the instantiation has not // to be distributed. This allows instantiations from ServerConnection @@ -112,7 +112,7 @@ public class InternalInstantiator { * @throws IllegalStateException * The instantiator cannot be registered */ - private static synchronized void _register(Instantiator instantiator, boolean distribute) + private static void _register(Instantiator instantiator, boolean distribute) { if (instantiator == null) { throw new NullPointerException(LocalizedStrings.InternalInstantiator_CANNOT_REGISTER_A_NULL_INSTANTIATOR.toLocalizedString()); @@ -130,41 +130,50 @@ public class InternalInstantiator { } } final Integer idx = Integer.valueOf(classId); - -boolean retry; -do { - retry = false; - Object oldInst = idsToInstantiators.putIfAbsent(idx, instantiator); - if (oldInst != null) { -if (oldInst instanceof Marker) { - retry = !idsToInstantiators.replace(idx, oldInst, instantiator); - if (!retry) { -dsMap.put(cName, instantiator); -((Marker) oldInst).setInstantiator(instantiator); + +synchronized(InternalInstantiator.class) { + boolean retry; + do { +retry = false; +Object oldInst = idsToInstantiators.putIfAbsent(idx, instantiator); +if (oldInst != null) { + if (oldInst instanceof Marker) { +retry = !idsToInstantiators.replace(idx, oldInst, instantiator); +if (!retry) { + dsMap.put(cName, instantiator); + ((Marker) oldInst).setInstantiator(instantiator); +} } -} else { - Class oldClass = -((Instantiator) oldInst).getInstantiatedClass(); - if (!oldClass.getName().equals(cName)) { -throw new IllegalStateException(LocalizedStrings.InternalInstantiator_CLASS_ID_0_IS_ALREADY_REGISTERED_FOR_CLASS_1_SO_IT_COULD_NOT_BE_REGISTED_FOR_CLASS_2.toLocalizedString(new Object[] {Integer.valueOf(classId), oldClass.getName(), cName})); - } else { -return; // it was already registered + else { +Class oldClass = + ((Instantiator) oldInst).getInstantiatedClass(); +if (!oldClass.getName().equals(cName)) { + throw new IllegalStateException( + LocalizedStrings.InternalInstantiator_CLASS_ID_0_IS_ALREADY_REGISTERED_FOR_CLASS_1_SO_IT_COULD_NOT_BE_REGISTED_FOR_CLASS_2 + .toLocalizedString(new Object[] { Integer.valueOf(classId), oldClass.getName(), cName
[12/38] incubator-geode git commit: GEODE-1937: Making precheckin depend on running examples
GEODE-1937: Making precheckin depend on running examples Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8a6a46ab Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8a6a46ab Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8a6a46ab Branch: refs/heads/feature/e2e-testing Commit: 8a6a46abde1a7f08fcf4605877f60ce9480fb296 Parents: 62bd240 Author: Dan SmithAuthored: Mon Sep 26 11:18:41 2016 -0700 Committer: Dan Smith Committed: Tue Sep 27 10:43:56 2016 -0700 -- build.gradle| 11 +++ geode-assembly/build.gradle | 2 ++ 2 files changed, 13 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a6a46ab/build.gradle -- diff --git a/build.gradle b/build.gradle index f7ce6bc..b360c40 100755 --- a/build.gradle +++ b/build.gradle @@ -86,3 +86,14 @@ subprojects { clean.finalizedBy rootProject.cleanAll } +task cleanExamples(type: GradleBuild) { + buildFile = 'geode-examples/build.gradle' + tasks = ['clean'] +} + +clean.dependsOn cleanExamples + +task buildExamples(type: GradleBuild, dependsOn: ':geode-assembly:installDist') { + buildFile = 'geode-examples/build.gradle' + tasks = ['build'] +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a6a46ab/geode-assembly/build.gradle -- diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle index a83b7a9..2b960eb 100755 --- a/geode-assembly/build.gradle +++ b/geode-assembly/build.gradle @@ -387,6 +387,8 @@ flakyTest dependOnInstalledProduct // Make build final task to generate all test and product resources build.dependsOn installDist +precheckin.dependsOn ':buildExamples' + installDist.dependsOn ':extensions/geode-modules-assembly:dist' /**Print the names of all jar files in a fileTree */
[06/38] incubator-geode git commit: Excluding .idea project for the geode-spark-connector from rat
Excluding .idea project for the geode-spark-connector from rat Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/da935065 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/da935065 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/da935065 Branch: refs/heads/feature/e2e-testing Commit: da935065b552d6bc52901df95fc1b0062f76a11f Parents: 71eb6bf Author: Dan SmithAuthored: Fri Sep 23 17:11:27 2016 -0700 Committer: Dan Smith Committed: Fri Sep 23 17:11:27 2016 -0700 -- gradle/rat.gradle | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/da935065/gradle/rat.gradle -- diff --git a/gradle/rat.gradle b/gradle/rat.gradle index 0c09c68..7e20c56 100644 --- a/gradle/rat.gradle +++ b/gradle/rat.gradle @@ -60,6 +60,7 @@ rat { '**/*.ipr', '**/*.iws', '.idea/**', +'geode-spark-connector/.idea/**', '**/tags', // text files
[05/38] incubator-geode git commit: GEODE-1934: Removing spring-core dependencies from geode-core
GEODE-1934: Removing spring-core dependencies from geode-core Remving the spring-core usage in geode-core classes that are not cli or web related. The CLI and web code needs to be split into separate projects. The rest of the geode-core should not depend on spring-core. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/71eb6bfb Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/71eb6bfb Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/71eb6bfb Branch: refs/heads/feature/e2e-testing Commit: 71eb6bfbc429e7cc226671c99f682ec4fb31115d Parents: 4f34424 Author: Dan SmithAuthored: Fri Sep 23 16:40:15 2016 -0700 Committer: Dan Smith Committed: Fri Sep 23 16:40:15 2016 -0700 -- .../geode/internal/net/SSLConfigurationFactory.java | 2 +- .../java/org/apache/geode/internal/net/SocketCreator.java | 2 +- .../internal/configuration/domain/XmlEntity.java | 10 +- .../org/apache/geode/pdx/internal/PdxInstanceImpl.java| 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/71eb6bfb/geode-core/src/main/java/org/apache/geode/internal/net/SSLConfigurationFactory.java -- diff --git a/geode-core/src/main/java/org/apache/geode/internal/net/SSLConfigurationFactory.java b/geode-core/src/main/java/org/apache/geode/internal/net/SSLConfigurationFactory.java index 4bea22b..4261248 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/net/SSLConfigurationFactory.java +++ b/geode-core/src/main/java/org/apache/geode/internal/net/SSLConfigurationFactory.java @@ -22,8 +22,8 @@ import java.util.Map; import java.util.Properties; import org.apache.commons.lang.ArrayUtils; -import org.springframework.util.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.geode.GemFireConfigException; import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.internal.admin.SSLConfig; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/71eb6bfb/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java -- diff --git a/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java b/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java index bc1e896..50a3095 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java +++ b/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java @@ -73,8 +73,8 @@ import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509ExtendedKeyManager; +import org.apache.commons.lang.StringUtils; import org.apache.logging.log4j.Logger; -import org.springframework.util.StringUtils; import org.apache.geode.GemFireConfigException; import org.apache.geode.SystemConnectException; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/71eb6bfb/geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/XmlEntity.java -- diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/XmlEntity.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/XmlEntity.java index 47f032e..cde1607 100644 --- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/XmlEntity.java +++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/XmlEntity.java @@ -32,8 +32,8 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.xpath.XPathExpressionException; +import org.apache.geode.internal.Assert; import org.apache.logging.log4j.Logger; -import org.springframework.util.Assert; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.xml.sax.InputSource; @@ -155,10 +155,10 @@ public class XmlEntity implements DataSerializable { * @since GemFire 8.1 */ private final void init() { -Assert.hasLength(type, "Type cannot be empty"); -Assert.hasLength(prefix, "Prefix cannot be empty"); -Assert.hasLength(namespace, "Namespace cannot be empty"); -Assert.notNull(attributes, "Attributes cannot be null"); +Assert.assertTrue(!StringUtils.isBlank(type)); +Assert.assertTrue(!StringUtils.isBlank(prefix)); +Assert.assertTrue(!StringUtils.isBlank(namespace)); +Assert.assertTrue(attributes != null); if (null == xmlDefinition) {
incubator-geode git commit: Exploring using docker for end-to-end tests
Repository: incubator-geode Updated Branches: refs/heads/feature/e2e-testing [created] a2ce01d33 Exploring using docker for end-to-end tests Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a2ce01d3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a2ce01d3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a2ce01d3 Branch: refs/heads/feature/e2e-testing Commit: a2ce01d33047cc781064f1ba9493c7a5ba4b5533 Parents: 85e97c3 Author: Jens DeppeAuthored: Thu Sep 29 08:26:40 2016 -0700 Committer: Jens Deppe Committed: Thu Sep 29 08:26:40 2016 -0700 -- .../test/java/org/apache/geode/DockerTest.java | 45 +++ .../apache/geode/container/DockerCluster.java | 132 +++ gradle/test.gradle | 3 +- 3 files changed, 179 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a2ce01d3/geode-core/src/test/java/org/apache/geode/DockerTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/DockerTest.java b/geode-core/src/test/java/org/apache/geode/DockerTest.java new file mode 100644 index 000..b5bc050 --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/DockerTest.java @@ -0,0 +1,45 @@ +package org.apache.geode; + +import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import org.apache.geode.container.DockerCluster; + +public class DockerTest { + + private DockerCluster cluster; + + @Before + public void setup() throws Exception { +cluster = new DockerCluster("testy", 2); + } + + @After + public void teardown() throws Exception { +cluster.stop(); + } + +// @Test + public void sanity() throws Exception { +cluster.start(); +assertNotNull("Locator address is null", cluster.getLocatorAddress()); + } + +// @Test + public void testInvalidGfshCommand() throws Exception { +String id = cluster.startContainer(0); +int r = cluster.execCommand(id, new String[] { "/tmp/work/bin/gfsh", "startx" }); +assertEquals(1, r); + } + + @Test + public void testCreateRegion() throws Exception { +cluster.start(); +cluster.gfshCommand("create region --name=FOO --type=REPLICATE"); +cluster.gfshCommand("list regions"); + } + +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a2ce01d3/geode-core/src/test/java/org/apache/geode/container/DockerCluster.java -- diff --git a/geode-core/src/test/java/org/apache/geode/container/DockerCluster.java b/geode-core/src/test/java/org/apache/geode/container/DockerCluster.java new file mode 100644 index 000..fea2e1a --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/container/DockerCluster.java @@ -0,0 +1,132 @@ +package org.apache.geode.container; + +import static com.google.common.base.Charsets.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.spotify.docker.client.DefaultDockerClient; +import com.spotify.docker.client.DockerClient; +import com.spotify.docker.client.LogStream; +import com.spotify.docker.client.exceptions.DockerException; +import com.spotify.docker.client.messages.ContainerConfig; +import com.spotify.docker.client.messages.ContainerCreation; +import com.spotify.docker.client.messages.HostConfig; + +public class DockerCluster { + + private DockerClient docker; + private int locatorCount; + private int serverCount; + private String name; + private List nodeIds; + private String locatorAddress; + + public DockerCluster(String name, int serverCount) { +this(name, 1, serverCount); + } + + public DockerCluster(String name, int locatorCount, int serverCount) { +docker = DefaultDockerClient.builder(). + uri("unix:///var/run/docker.sock").build(); + +this.name = name; +this.locatorCount = locatorCount; +this.serverCount = serverCount; +this.nodeIds = new ArrayList<>(); + } + + public void start() throws Exception { +startLocators(); +startServers(); + } + + public String startContainer(int index) throws DockerException, InterruptedException { +String geodeHome = System.getenv("GEODE_HOME"); +String vol = String.format("%s:/tmp/work", geodeHome); + +HostConfig hostConfig = HostConfig. + builder(). + appendBinds(vol). + build(); + +ContainerConfig config = ContainerConfig.builder(). + image("gemfire/ubuntu-gradle"). + openStdin(true). + hostname(String.format("%s-%d", name, index)). + hostConfig(hostConfig). + workingDir("/tmp"). + build(); + +
[incubator-geode] Git Push Summary
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1817 [deleted] eb8e4bb30
incubator-geode git commit: Add releaseQualifier and releaseType
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1817 f51981b25 -> eb8e4bb30 Add releaseQualifier and releaseType Signed-off-by: Alexander MurmannProject: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/eb8e4bb3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/eb8e4bb3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/eb8e4bb3 Branch: refs/heads/feature/GEODE-1817 Commit: eb8e4bb30740e9a73532fde8e775d7680b1f8067 Parents: f51981b Author: Jens Deppe Authored: Fri Aug 26 14:39:23 2016 -0700 Committer: Alexander Murmann Committed: Fri Aug 26 14:39:23 2016 -0700 -- build.gradle | 3 ++- gradle.properties | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eb8e4bb3/build.gradle -- diff --git a/build.gradle b/build.gradle index e75174f..b2c90a7 100755 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,8 @@ dependencyVersions.load(new FileInputStream("${project.projectDir}/gradle/depend dependencyVersions.keys().each{ k -> project.ext[k] = dependencyVersions[k]} allprojects { - version = versionNumber + version = versionNumber + releaseQualifier + releaseType + ext.isReleaseVersion = !version.endsWith("SNAPSHOT") // We want to see all test results. This is equivalatent to setting --continue // on the command line. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/eb8e4bb3/gradle.properties -- diff --git a/gradle.properties b/gradle.properties index 54efd00..d5c69cf 100755 --- a/gradle.properties +++ b/gradle.properties @@ -18,6 +18,8 @@ # .M? - milestone release #- release versionNumber = 1.0.0-incubating +releaseQualifier = +releaseType = # Set the buildId to add build metadata that can be viewed from # gfsh or pulse (`gfsh version --full`). Can be set using
incubator-geode git commit: Revert changes which disable signing as well as Jenkins specifc code
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1817 67de9b94e -> f51981b25 Revert changes which disable signing as well as Jenkins specifc code Signed-off-by: Alexander MurmannProject: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f51981b2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f51981b2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f51981b2 Branch: refs/heads/feature/GEODE-1817 Commit: f51981b25b1f6eeaacbefd79fb1225b296da2ce1 Parents: 67de9b9 Author: Jens Deppe Authored: Fri Aug 26 07:55:35 2016 -0700 Committer: Alexander Murmann Committed: Fri Aug 26 07:55:35 2016 -0700 -- gradle/publish.gradle | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f51981b2/gradle/publish.gradle -- diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 92f740b..2258da6 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -14,17 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -// This snippet is required so that the root project does not insist on needing to be signed. -gradle.projectsEvaluated { g -> - g.rootProject.signing { -required { false } - } -} - subprojects { apply plugin: 'com.bmuschko.nexus' - + extraArchive { sources = true javadoc = true @@ -32,7 +24,7 @@ subprojects { } nexus { -sign = false +sign = true repositoryUrl = 'https://repository.apache.org/service/local/staging/deploy/maven2' snapshotRepositoryUrl = 'https://repository.apache.org/content/repositories/snapshots' } @@ -106,6 +98,29 @@ subprojects { } } } + + // The nexus plugin reads authentication from ~/.gradle/gradle.properties but the + // jenkins server stores publishing credentials in ~/.m2/settings.xml (maven). + // We match on the expected snapshot repository id. + afterEvaluate { +if (!isReleaseVersion && System.env.USER == 'jenkins') { + def settingsXml = new File(System.getProperty('user.home'), '.m2/settings.xml') + if (settingsXml.exists()) { +def snapshotCreds = new XmlSlurper().parse(settingsXml).servers.server.find { server -> + server.id.text() == 'apache.snapshots.https' +} + +if (snapshotCreds != null) { + tasks.uploadArchives.doFirst { +repositories().withType(MavenDeployer).each { repo -> + repo.snapshotRepository.authentication.userName = snapshotCreds.username.text() + repo.snapshotRepository.authentication.password = snapshotCreds.password.text() +} + } +} + } +} + } } //Prompt the user for a password to sign archives or upload artifacts, if requested
[2/7] incubator-geode git commit: GEODE-1699: Making accessor VM a proxy in LuceneQuery tests
GEODE-1699: Making accessor VM a proxy in LuceneQuery tests The P2P lucene query tests were creating an accessor VM that was actually a datastore. That caused some of the tests that thought they were pausing the dispatcher for the AEQ to still have an active dispatcher on the accessor. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fb39f889 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fb39f889 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fb39f889 Branch: refs/heads/feature/GEODE-1817 Commit: fb39f889ac1cb891f39aae281419e723e5b615c0 Parents: f253ad2 Author: Dan SmithAuthored: Tue Aug 23 15:50:35 2016 -0700 Committer: Dan Smith Committed: Wed Aug 24 09:33:26 2016 -0700 -- .../gemfire/cache/lucene/LuceneQueriesPeerPRDUnitTest.java | 5 - .../cache/lucene/LuceneQueriesPeerPRRedundancyDUnitTest.java| 5 - 2 files changed, 8 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fb39f889/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRDUnitTest.java -- diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRDUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRDUnitTest.java index 702ac1f..3af44ef 100644 --- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRDUnitTest.java +++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRDUnitTest.java @@ -35,6 +35,9 @@ public class LuceneQueriesPeerPRDUnitTest extends LuceneQueriesPRBase { } @Override protected void initAccessor(final SerializableRunnableIF createIndex) throws Exception { -initDataStore(createIndex); +createIndex.run(); +getCache().createRegionFactory(RegionShortcut.PARTITION_PROXY) +.setPartitionAttributes(getPartitionAttributes()) +.create(REGION_NAME); } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fb39f889/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRRedundancyDUnitTest.java -- diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRRedundancyDUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRRedundancyDUnitTest.java index d509cb2..f44f547 100644 --- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRRedundancyDUnitTest.java +++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneQueriesPeerPRRedundancyDUnitTest.java @@ -52,7 +52,10 @@ public class LuceneQueriesPeerPRRedundancyDUnitTest extends LuceneQueriesPRBase } @Override protected void initAccessor(final SerializableRunnableIF createIndex) throws Exception { -initDataStore(createIndex); +createIndex.run(); +Region region = getCache().createRegionFactory(RegionShortcut.PARTITION_PROXY_REDUNDANT) +.setPartitionAttributes(getPartitionAttributes()) +.create(REGION_NAME); } @Test
[6/7] incubator-geode git commit: GEODE-1809: Refactor GemFireVersion
GEODE-1809: Refactor GemFireVersion Clean up dead / broken / unused code and reduce the visible API methods. Store the version info as a Map to allow it to be extended more easily. Move scm info into utilities.gradle. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/93985f96 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/93985f96 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/93985f96 Branch: refs/heads/feature/GEODE-1817 Commit: 93985f96fe5eca16ad301aa09f1719bc213b6034 Parents: 98531a1 Author: Anthony BakerAuthored: Tue Aug 23 14:32:16 2016 -0700 Committer: Anthony Baker Committed: Thu Aug 25 10:00:52 2016 -0700 -- build.gradle| 1 - geode-core/build.gradle | 33 - .../distributed/internal/StartupMessage.java| 14 - .../gemfire/internal/GemFireVersion.java| 726 +-- .../gemstone/gemfire/internal/SystemAdmin.java | 10 +- .../internal/GemFireVersionJUnitTest.java | 75 +- .../gemfire/internal/VersionJUnitTest.java | 50 ++ gradle/utilities.gradle | 43 ++ 8 files changed, 275 insertions(+), 677 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/93985f96/build.gradle -- diff --git a/build.gradle b/build.gradle index eac68d0..e112eb7 100755 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,6 @@ buildscript { dependencies { classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.2.0" -classpath "org.ajoberstar:gradle-git:1.3.2" classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.0.1' } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/93985f96/geode-core/build.gradle -- diff --git a/geode-core/build.gradle b/geode-core/build.gradle index 1d5ad4a..ea1fce2 100755 --- a/geode-core/build.gradle +++ b/geode-core/build.gradle @@ -133,39 +133,6 @@ sourceSets { } } -ext.readScmInfo = { - try { -def git = org.ajoberstar.grgit.Grgit.open(currentDir: projectDir) -try { - return [ -'Source-Repository': git.branch.getCurrent().name, -'Source-Revision' : git.head().id, -'Source-Date' : git.head().getDate().format('-MM-dd HH:mm:ss Z') - ] as Properties -} finally { - git.close() -} - } catch (IllegalArgumentException e) { -// if we're building from the source distribution, we don't have git so -// use cached info written during the assembly process -def buildInfo = file "$rootDir/.buildinfo" -if (buildInfo.exists()) { - def props = new Properties() - new FileInputStream(buildInfo).withStream { fis -> -props.load(fis) - } - return props -} - -logger.warn( '* Unable to find Git workspace. Using default version information *' ) -return [ - 'Source-Repository': 'UNKNOWN', - 'Source-Revision' : 'UNKNOWN', - 'Source-Date' : new Date().format('-MM-dd HH:mm:ss Z') -] as Properties - } -} - // Creates the version properties file and writes it to the classes dir task createVersionPropertiesFile { def propertiesFile = file(generatedResources + "/com/gemstone/gemfire/internal/GemFireVersion.properties"); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/93985f96/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java index 82f5c88..7b6d853 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java @@ -178,20 +178,6 @@ public final class StartupMessage extends HighPriorityDistributionMessage implem String myVersion = GemFireVersion.getGemFireVersion(); String theirVersion = this.version; -int myMajorVersion = GemFireVersion.getMajorVersion(myVersion); -int theirMajorVersion = GemFireVersion.getMajorVersion(theirVersion); -int myMinorVersion = GemFireVersion.getMinorVersion(myVersion); -int theirMinorVersion = GemFireVersion.getMinorVersion(theirVersion); -// fix for bug 43608 -if (myMajorVersion != theirMajorVersion || myMinorVersion != theirMinorVersion) { - // now don't reject
[5/7] incubator-geode git commit: GEODE-1816: Workaround to clear statics in CacheCreationJUnitTest
GEODE-1816: Workaround to clear statics in CacheCreationJUnitTest Working around the fact that other tests are leaving static thread locals set, causing this test to fail. The actual fix is to remove the static thread locals from the product. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/98531a16 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/98531a16 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/98531a16 Branch: refs/heads/feature/GEODE-1817 Commit: 98531a16f8844a1028e2e6de293eb080d8ea7a1d Parents: 8c85ef9 Author: Dan SmithAuthored: Wed Aug 24 16:57:10 2016 -0700 Committer: Dan Smith Committed: Wed Aug 24 16:57:10 2016 -0700 -- .../gemstone/gemfire/internal/cache/CacheServerLauncher.java | 7 +++ .../internal/cache/xmlcache/CacheCreationJUnitTest.java | 2 ++ 2 files changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/98531a16/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java index 17875bf..fcb0876 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java @@ -615,6 +615,13 @@ public class CacheServerLauncher { return disableDefaultServer.get(); } + public static void clearStatics() { +disableDefaultServer.set(null); +serverPort.set(null); +serverBindAddress.set(null); + } + + /** * The method that does the work of being a cache server. It is * invoked in the VM spawned by the {@link #start} method. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/98531a16/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java index e99a04b..d081e82 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java @@ -35,6 +35,7 @@ import org.mockito.MockitoAnnotations; import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.internal.cache.CacheServerImpl; +import com.gemstone.gemfire.internal.cache.CacheServerLauncher; import com.gemstone.gemfire.internal.cache.GemFireCacheImpl; import com.gemstone.gemfire.test.junit.categories.UnitTest; @@ -47,6 +48,7 @@ public class CacheCreationJUnitTest { @Before public void setUp() { MockitoAnnotations.initMocks(this); +CacheServerLauncher.clearStatics(); } @Test
[4/7] incubator-geode git commit: GEODE-838 Test now uses port 0 for cacheServer
GEODE-838 Test now uses port 0 for cacheServer Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/7454c3fd Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/7454c3fd Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/7454c3fd Branch: refs/heads/feature/GEODE-1817 Commit: 7454c3fd35d4e818ca3a83e5b8def8503ea30717 Parents: fb39f88 Author: Hitesh KhamesraAuthored: Wed Aug 24 10:22:44 2016 -0700 Committer: Hitesh Khamesra Committed: Wed Aug 24 10:26:51 2016 -0700 -- .../security/ClientAuthenticationTestCase.java | 33 ++-- 1 file changed, 16 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7454c3fd/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestCase.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestCase.java index d7c75c7..7e6d022 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestCase.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestCase.java @@ -453,17 +453,16 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest // Try to connect client1 with no credentials // Verify that the creation of region throws security exception -server1.invoke(() -> createCacheServer(locPort1, locString, port1, authenticator, extraProps, javaProps)); - +final int p = server1.invoke(() -> createCacheServer(locPort1, locString, 0, authenticator, extraProps, javaProps)); if (gen.classCode().equals(CredentialGenerator.ClassCode.SSL)) { // For SSL the exception may not come since the server can close socket // before handshake message is sent from client. However exception // should come in any region operations. - client1.invoke(() -> createCacheClient(null, null, null, port1, port2, zeroConns, multiUser, NOFORCE_AUTHREQ_EXCEPTION)); + client1.invoke(() -> createCacheClient(null, null, null, p, port2, zeroConns, multiUser, NOFORCE_AUTHREQ_EXCEPTION)); client1.invoke(() -> doPuts(2, OTHER_EXCEPTION)); } else { - client1.invoke(() -> createCacheClient(null, null, null, port1, port2, zeroConns, multiUser, AUTHREQ_EXCEPTION)); + client1.invoke(() -> createCacheClient(null, null, null, p, port2, zeroConns, multiUser, AUTHREQ_EXCEPTION)); } // Now try to connect client2 with invalid credentials @@ -472,23 +471,23 @@ public abstract class ClientAuthenticationTestCase extends JUnit4DistributedTest javaProps2 = gen.getJavaProperties(); getLogWriter().info("testCredentialsForNotifications: For second client invalid credentials: " + credentials2 + " : " + javaProps2); -createClient2WithException(multiUser, authInit, port1, port2, credentials2, javaProps2, zeroConns); +createClient2WithException(multiUser, authInit, p, port2, credentials2, javaProps2, zeroConns); // Now try to connect client2 with invalid auth-init method // Trying to create the region on client with valid credentials should // throw a security exception -client2.invoke(() -> createCacheClient("com.gemstone.none", credentials1, javaProps1, port1, port2, zeroConns, multiUser, SECURITY_EXCEPTION)); +client2.invoke(() -> createCacheClient("com.gemstone.none", credentials1, javaProps1, p, port2, zeroConns, multiUser, SECURITY_EXCEPTION)); // Try connection with null auth-init on clients. // Skip this test for a scheme which does not have an authInit in the // first place (e.g. SSL). if (authInit != null && authInit.length() > 0) { - server1.invoke(() -> createCacheServer(locPort1, locString, port1, authenticator, extraProps, javaProps)); - server2.invoke(() -> createCacheServer(locPort2, locString, port2, authenticator, extraProps, javaProps)); - client1.invoke(() -> createCacheClient(null, credentials1, javaProps1, port1, port2, 0, multiUser, AUTHREQ_EXCEPTION)); + final int p1 = server1.invoke(() -> createCacheServer(locPort1, locString, 0, authenticator, extraProps, javaProps)); + final int p2 = server2.invoke(() -> createCacheServer(locPort2, locString, 0, authenticator, extraProps, javaProps)); + client1.invoke(() -> createCacheClient(null, credentials1, javaProps1, p1, p2, 0, multiUser, AUTHREQ_EXCEPTION)); - createClient2AuthReqException(multiUser, port1, port2, credentials2, javaProps2, zeroConns); - createClient2AuthReqException(multiUser, port1,
[1/7] incubator-geode git commit: GEODE-1813: Don't pass fixed partition attributes to BucketRegionQueue
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1817 1cc598809 -> 67de9b94e GEODE-1813: Don't pass fixed partition attributes to BucketRegionQueue The BucketRegionQueue should not inherit the fixed partition attributes from the parent region. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f253ad2f Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f253ad2f Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f253ad2f Branch: refs/heads/feature/GEODE-1817 Commit: f253ad2f1e7c725a6497c434e9f8a23028bda8de Parents: 3726973 Author: Dan SmithAuthored: Mon Aug 22 18:04:20 2016 -0700 Committer: Dan Smith Committed: Wed Aug 24 09:32:52 2016 -0700 -- .../internal/cache/PartitionedRegion.java | 13 +++-- .../cache/wan/AsyncEventQueueTestBase.java | 55 .../asyncqueue/AsyncEventListenerDUnitTest.java | 29 +++ 3 files changed, 93 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f253ad2f/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java index df9ceba..175a284 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java @@ -660,18 +660,23 @@ public class PartitionedRegion extends LocalRegion implements this.partitionListeners = this.partitionAttributes.getPartitionListeners(); this.colocatedWithRegion = ColocationHelper.getColocatedRegion(this); -if (colocatedWithRegion != null) { - //In colocation chain, child region inherita the fixed partitin attributes from parent region. - this.fixedPAttrs = colocatedWithRegion.getFixedPartitionAttributesImpl(); - this.fixedPASet = colocatedWithRegion.fixedPASet; + +if(colocatedWithRegion != null) { synchronized (colocatedWithRegion.colocatedByList) { colocatedWithRegion.colocatedByList.add(this); } } + +if (colocatedWithRegion != null && !internalRegionArgs.isUsedForParallelGatewaySenderQueue()) { + //In a colocation chain, the child region inherits the fixed partition attributes from parent region. + this.fixedPAttrs = colocatedWithRegion.getFixedPartitionAttributesImpl(); + this.fixedPASet = colocatedWithRegion.fixedPASet; +} else { this.fixedPAttrs = this.partitionAttributes.getFixedPartitionAttributes(); this.fixedPASet = 0; } + if (logger.isDebugEnabled()) { logger.debug("Partitioned Region {} constructed {}", regionname, (this.haveCacheLoader ? "with a cache loader" : "")); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f253ad2f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java index d7739c5..c66ef0b 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java @@ -53,6 +53,9 @@ import com.gemstone.gemfire.cache.Declarable; import com.gemstone.gemfire.cache.DiskStore; import com.gemstone.gemfire.cache.DiskStoreFactory; import com.gemstone.gemfire.cache.EntryEvent; +import com.gemstone.gemfire.cache.EntryOperation; +import com.gemstone.gemfire.cache.FixedPartitionAttributes; +import com.gemstone.gemfire.cache.FixedPartitionResolver; import com.gemstone.gemfire.cache.LoaderHelper; import com.gemstone.gemfire.cache.PartitionAttributesFactory; import com.gemstone.gemfire.cache.Region; @@ -628,6 +631,31 @@ public class AsyncEventQueueTestBase extends JUnit4DistributedTestCase { } } + public static void createFixedPartitionedRegionWithAsyncEventQueue( +String regionName, String asyncEventQueueId, String partitionName, final List allPartitions, boolean offHeap) { +IgnoredException exp = IgnoredException.addIgnoredException(ForceReattemptException.class + .getName()); +IgnoredException exp1 = IgnoredException.addIgnoredException(PartitionOfflineException.class + .getName()); +try { +
[7/7] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-1817
Merge branch 'develop' into feature/GEODE-1817 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/67de9b94 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/67de9b94 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/67de9b94 Branch: refs/heads/feature/GEODE-1817 Commit: 67de9b94e5f1555669d3a5dcad226d92c41b09a8 Parents: 1cc5988 93985f9 Author: Jens DeppeAuthored: Thu Aug 25 11:26:40 2016 -0700 Committer: Jens Deppe Committed: Thu Aug 25 11:26:40 2016 -0700 -- build.gradle| 1 - geode-core/build.gradle | 33 - .../distributed/internal/StartupMessage.java| 14 - .../gemfire/internal/GemFireVersion.java| 726 +-- .../gemstone/gemfire/internal/SystemAdmin.java | 10 +- .../internal/cache/CacheServerLauncher.java | 7 + .../internal/cache/PartitionedRegion.java | 13 +- .../distributed/DistributedSystemDUnitTest.java | 6 +- .../internal/GemFireVersionJUnitTest.java | 75 +- .../gemfire/internal/VersionJUnitTest.java | 50 ++ .../cache/wan/AsyncEventQueueTestBase.java | 55 ++ .../asyncqueue/AsyncEventListenerDUnitTest.java | 29 + .../cache/xmlcache/CacheCreationJUnitTest.java | 2 + .../security/ClientAuthenticationTestCase.java | 33 +- .../lucene/LuceneQueriesPeerPRDUnitTest.java| 5 +- .../LuceneQueriesPeerPRRedundancyDUnitTest.java | 5 +- gradle/utilities.gradle | 43 ++ 17 files changed, 404 insertions(+), 703 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67de9b94/build.gradle --
[3/7] incubator-geode git commit: GEODE-1198 Now test make sure ports are available for port range
GEODE-1198 Now test make sure ports are available for port range Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8c85ef95 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8c85ef95 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8c85ef95 Branch: refs/heads/feature/GEODE-1817 Commit: 8c85ef959458aaa91a925132a68e3ce06ec95f89 Parents: 7454c3f Author: Hitesh KhamesraAuthored: Wed Aug 24 10:24:44 2016 -0700 Committer: Hitesh Khamesra Committed: Wed Aug 24 10:26:51 2016 -0700 -- .../gemfire/distributed/DistributedSystemDUnitTest.java| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8c85ef95/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java index 1be3b9f..c6fa5a2 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java @@ -361,10 +361,10 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase { public void testConflictingUDPPort() throws Exception { final Properties config = new Properties(); final int mcastPort = AvailablePort.getRandomAvailablePort(AvailablePort.MULTICAST); -final int[] socketPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2, true); -final int unicastPort = socketPorts[0]; +final int[] socketPorts = AvailablePortHelper.getRandomAvailableTCPPorts(1, true); +final int unicastPort = getPortRange(3); config.setProperty(MCAST_PORT, String.valueOf(mcastPort)); -config.setProperty(START_LOCATOR, "localhost[" + socketPorts[1] + "]"); +config.setProperty(START_LOCATOR, "localhost[" + socketPorts[0] + "]"); config.setProperty(MEMBERSHIP_PORT_RANGE, ""+unicastPort+"-"+(unicastPort+2)); InternalDistributedSystem system = (InternalDistributedSystem)DistributedSystem.connect(config);
incubator-geode git commit: [GEODE-1817] Prepare for 'release quality' publishing
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1817 [created] 1cc598809 [GEODE-1817] Prepare for 'release quality' publishing - Remove releaseType property (i.e. default build will not be -SNAPSHOT) - Nexus plugin will want to sign artifacts, so disable that by default - Remove block of code which expects creds to come from Jenkins env Signed-off-by: Alexander MurmannProject: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1cc59880 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1cc59880 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1cc59880 Branch: refs/heads/feature/GEODE-1817 Commit: 1cc598809a9be3111e5d2fc15687fd17be70a090 Parents: 3726973 Author: Jens Deppe Authored: Thu Aug 25 10:38:55 2016 -0700 Committer: Alexander Murmann Committed: Thu Aug 25 10:38:55 2016 -0700 -- build.gradle | 4 +--- gradle.properties | 1 - gradle/publish.gradle | 35 ++- 3 files changed, 11 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc59880/build.gradle -- diff --git a/build.gradle b/build.gradle index eac68d0..1444647 100755 --- a/build.gradle +++ b/build.gradle @@ -40,9 +40,7 @@ dependencyVersions.load(new FileInputStream("${project.projectDir}/gradle/depend dependencyVersions.keys().each{ k -> project.ext[k] = dependencyVersions[k]} allprojects { - - version = versionNumber + releaseType - ext.isReleaseVersion = !version.endsWith("SNAPSHOT") + version = versionNumber // We want to see all test results. This is equivalatent to setting --continue // on the command line. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc59880/gradle.properties -- diff --git a/gradle.properties b/gradle.properties index 06855c7..54efd00 100755 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,6 @@ # .M? - milestone release #- release versionNumber = 1.0.0-incubating -releaseType = -SNAPSHOT # Set the buildId to add build metadata that can be viewed from # gfsh or pulse (`gfsh version --full`). Can be set using http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cc59880/gradle/publish.gradle -- diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 2258da6..92f740b 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -14,9 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +// This snippet is required so that the root project does not insist on needing to be signed. +gradle.projectsEvaluated { g -> + g.rootProject.signing { +required { false } + } +} + subprojects { apply plugin: 'com.bmuschko.nexus' - + extraArchive { sources = true javadoc = true @@ -24,7 +32,7 @@ subprojects { } nexus { -sign = true +sign = false repositoryUrl = 'https://repository.apache.org/service/local/staging/deploy/maven2' snapshotRepositoryUrl = 'https://repository.apache.org/content/repositories/snapshots' } @@ -98,29 +106,6 @@ subprojects { } } } - - // The nexus plugin reads authentication from ~/.gradle/gradle.properties but the - // jenkins server stores publishing credentials in ~/.m2/settings.xml (maven). - // We match on the expected snapshot repository id. - afterEvaluate { -if (!isReleaseVersion && System.env.USER == 'jenkins') { - def settingsXml = new File(System.getProperty('user.home'), '.m2/settings.xml') - if (settingsXml.exists()) { -def snapshotCreds = new XmlSlurper().parse(settingsXml).servers.server.find { server -> - server.id.text() == 'apache.snapshots.https' -} - -if (snapshotCreds != null) { - tasks.uploadArchives.doFirst { -repositories().withType(MavenDeployer).each { repo -> - repo.snapshotRepository.authentication.userName = snapshotCreds.username.text() - repo.snapshotRepository.authentication.password = snapshotCreds.password.text() -} - } -} - } -} - } } //Prompt the user for a password to sign archives or upload artifacts, if requested
[incubator-geode] Git Push Summary
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666-2 [deleted] 347e24c34
incubator-geode git commit: GEODE-1666: Bump Gradle from 2.12 to 2.14.1
Repository: incubator-geode Updated Branches: refs/heads/develop cb9c1e799 -> 2e2b44634 GEODE-1666: Bump Gradle from 2.12 to 2.14.1 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/2e2b4463 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/2e2b4463 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/2e2b4463 Branch: refs/heads/develop Commit: 2e2b44634fcb476f65204d82dc7d026520401ae4 Parents: cb9c1e7 Author: Jens DeppeAuthored: Tue Aug 2 07:12:54 2016 -0700 Committer: Jens Deppe Committed: Tue Aug 2 07:12:54 2016 -0700 -- gradle.properties| 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2e2b4463/gradle.properties -- diff --git a/gradle.properties b/gradle.properties index 4d1cce9..06855c7 100755 --- a/gradle.properties +++ b/gradle.properties @@ -31,7 +31,7 @@ productOrg = Apache Software Foundation (ASF) org.gradle.daemon = true org.gradle.jvmargs = -Xmx2048m -minimumGradleVersion = 2.12 +minimumGradleVersion = 2.14.1 # Set this on the command line with -P or in ~/.gradle/gradle.properties # to change the buildDir location. Use an absolute path. buildRoot= http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2e2b4463/gradle/wrapper/gradle-wrapper.properties -- diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ec27a39..d57b5d9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
incubator-geode git commit: Also bump minimumGradleVersion
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666-2 c72391cd3 -> 347e24c34 Also bump minimumGradleVersion Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/347e24c3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/347e24c3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/347e24c3 Branch: refs/heads/feature/GEODE-1666-2 Commit: 347e24c34a11f82f33b4907f29a9ed9f33511605 Parents: c72391c Author: Jens DeppeAuthored: Tue Aug 2 06:52:06 2016 -0700 Committer: Jens Deppe Committed: Tue Aug 2 06:52:06 2016 -0700 -- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/347e24c3/gradle.properties -- diff --git a/gradle.properties b/gradle.properties index fc5fa60..06855c7 100755 --- a/gradle.properties +++ b/gradle.properties @@ -31,7 +31,7 @@ productOrg = Apache Software Foundation (ASF) org.gradle.daemon = true org.gradle.jvmargs = -Xmx2048m -minimumGradleVersion = 2.14 +minimumGradleVersion = 2.14.1 # Set this on the command line with -P or in ~/.gradle/gradle.properties # to change the buildDir location. Use an absolute path. buildRoot=
incubator-geode git commit: GEODE-1666: Bump Gradle to 2.14.1
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666-2 f3b80d60d -> c72391cd3 GEODE-1666: Bump Gradle to 2.14.1 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c72391cd Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c72391cd Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c72391cd Branch: refs/heads/feature/GEODE-1666-2 Commit: c72391cd39d25c4ee15bb30d8408adce36d3d08d Parents: f3b80d6 Author: Jens DeppeAuthored: Tue Aug 2 06:49:33 2016 -0700 Committer: Jens Deppe Committed: Tue Aug 2 06:49:33 2016 -0700 -- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c72391cd/gradle/wrapper/gradle-wrapper.properties -- diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3050eca..d57b5d9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
incubator-geode git commit: GEODE-1666: Update minimumGradleVersion to 2.14
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666-2 32f2fb413 -> f3b80d60d GEODE-1666: Update minimumGradleVersion to 2.14 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f3b80d60 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f3b80d60 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f3b80d60 Branch: refs/heads/feature/GEODE-1666-2 Commit: f3b80d60df4fa83f46b6d5adfe092f136618d389 Parents: 32f2fb4 Author: Jens DeppeAuthored: Mon Aug 1 07:09:41 2016 -0700 Committer: Jens Deppe Committed: Mon Aug 1 07:09:49 2016 -0700 -- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f3b80d60/gradle.properties -- diff --git a/gradle.properties b/gradle.properties index 4d1cce9..fc5fa60 100755 --- a/gradle.properties +++ b/gradle.properties @@ -31,7 +31,7 @@ productOrg = Apache Software Foundation (ASF) org.gradle.daemon = true org.gradle.jvmargs = -Xmx2048m -minimumGradleVersion = 2.12 +minimumGradleVersion = 2.14 # Set this on the command line with -P or in ~/.gradle/gradle.properties # to change the buildDir location. Use an absolute path. buildRoot=
incubator-geode git commit: GEODE-1666: Bump Gradle from 2.12 to 2.14
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666-2 [created] 32f2fb413 GEODE-1666: Bump Gradle from 2.12 to 2.14 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/32f2fb41 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/32f2fb41 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/32f2fb41 Branch: refs/heads/feature/GEODE-1666-2 Commit: 32f2fb4130c2dc2e1e597032596dcde27f671f04 Parents: a6e9569 Author: Jens DeppeAuthored: Wed Jul 27 14:06:27 2016 -0700 Committer: Jens Deppe Committed: Wed Jul 27 14:06:27 2016 -0700 -- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/32f2fb41/gradle/wrapper/gradle-wrapper.properties -- diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ec27a39..3050eca 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
[incubator-geode] Git Push Summary
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666 [deleted] ad2d88865
incubator-geode git commit: GEODE-1666: Remove lingering docker plugin setup
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666 97a8452e7 -> ad2d88865 GEODE-1666: Remove lingering docker plugin setup Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ad2d8886 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ad2d8886 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ad2d8886 Branch: refs/heads/feature/GEODE-1666 Commit: ad2d8886527003855b78585bb2aed1dc08617613 Parents: 97a8452 Author: Jens DeppeAuthored: Wed Jul 27 13:54:29 2016 -0700 Committer: Jens Deppe Committed: Wed Jul 27 13:54:29 2016 -0700 -- build.gradle | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ad2d8886/build.gradle -- diff --git a/build.gradle b/build.gradle index 04e685c..9a3ff10 100755 --- a/build.gradle +++ b/build.gradle @@ -18,14 +18,12 @@ buildscript { repositories { maven { url "https://plugins.gradle.org/m2/; } -maven { url = "http://dl.bintray.com/pedjak/gradle-plugins"} } dependencies { classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.2.0" classpath "org.ajoberstar:gradle-git:1.3.2" classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' -classpath "com.pedjak.gradle.plugins:dockerized-test:0.4.2" } }
incubator-geode git commit: GEODE-1666: Move docker config to closed side
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666 bc58a1350 -> 97a8452e7 GEODE-1666: Move docker config to closed side Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/97a8452e Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/97a8452e Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/97a8452e Branch: refs/heads/feature/GEODE-1666 Commit: 97a8452e7f092dae68af8fa8eb51df3b333b2820 Parents: bc58a13 Author: Jens DeppeAuthored: Wed Jul 27 13:02:03 2016 -0700 Committer: Jens Deppe Committed: Wed Jul 27 13:02:03 2016 -0700 -- gradle/test.gradle | 91 - 1 file changed, 91 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/97a8452e/gradle/test.gradle -- diff --git a/gradle/test.gradle b/gradle/test.gradle index baceebd..96ea88d 100644 --- a/gradle/test.gradle +++ b/gradle/test.gradle @@ -45,8 +45,6 @@ gradle.taskGraph.whenReady({ graph -> subprojects { - apply plugin: 'com.github.pedjak.dockerized-test' - dependencies { testCompile ('com.github.stefanbirkner:system-rules:' + project.'system-rules.version') { exclude module: 'junit-dep' @@ -132,95 +130,6 @@ subprojects { excludeCategories 'com.gemstone.gemfire.test.junit.categories.FlakyTest' } forkEvery 30 - -maxParallelForks = 5 - -docker { - // base image for creating docker containers that execute the tests - image = 'gemfire/ubuntu-jdk8' - - // volumes mounted to the containers - // in a form: host_dir : container_dir - def pwd = System.getenv('PWD') - def gradleHome = System.getenv('GRADLE_USER_HOME') ?: "${System.getenv('HOME')}/.gradle" - volumes = ["${gradleHome}":gradleHome] - - // Figure out if we're building Geode or GemFire - if (new File(pwd, 'geode-core').exists()) { -volumes << ["${pwd}":pwd] - } else { -// Assume that our directory structure has 'open/' in the parent of the PWD. -// For example: -// .../gemfire (PWD) -// +--/gemfire-test -// +--/etc -// .../open -// +--/geode-core -// +--/etc -def gemfireDir = new File("${pwd}").getParent() -// Make sure we resolve symlinks by using getCanonicalPath -def geodeDir = new File(gemfireDir, 'open').getCanonicalPath() -volumes << ["${gemfireDir}": gemfireDir] -volumes << ["${geodeDir}": geodeDir] - } - - // specify the user for starting Gradle test worker - // within the container, default to current user - // user = 'control' - - argsInspect = { List args -> -def javaHomeIdx = 0 -def i = args.iterator() -def j = 0 -while (i.hasNext()) { - if (i.next() == '-e') { -def x = i.next() -j++ -if (x.startsWith('JAVA_HOME')) { - javaHomeIdx = j -} - } - j++ -} - -// Remove JAVA_HOME env variable - it might not be the same as the container needs -if (javaHomeIdx > 0) { - args.removeAt(javaHomeIdx-1) - args.removeAt(javaHomeIdx-1) -} - -// custom args processing and tweaking -// of the docker command starting the testworker inside a container -// returned args will be used for the final docker container start -def javaIdx = 0 -def javaCmd = ["( ulimit -n 2048; "] -args.eachWithIndex { val, idx -> - if (val == 'java') { -javaIdx = idx - } - if (javaIdx > 0) { -javaCmd << val - } -} - -if (javaIdx != 0) { - javaCmd << ")" - args = args.subList(0, javaIdx) - args.addAll("/bin/bash", "-c", javaCmd.join(" ")) -} - -// Infer the index of this invocation -def matcher = (args[args.size - 1] =~ /.*Executor (\d*).*/) - -args[3] = args[3] + matcher[0][1] -def workdir = new File(args[3]) -// println "--->>> making ${workdir}" -workdir.mkdirs() -// println args - -args - } -} } task flakyTest(type:Test) {
incubator-geode git commit: Comment out some debugging code
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666 313436932 -> bc58a1350 Comment out some debugging code Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/bc58a135 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/bc58a135 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/bc58a135 Branch: refs/heads/feature/GEODE-1666 Commit: bc58a13507537eafe771a1f38ce20e151d3972e7 Parents: 3134369 Author: Jens DeppeAuthored: Tue Jul 26 07:17:19 2016 -0700 Committer: Jens Deppe Committed: Tue Jul 26 07:18:29 2016 -0700 -- gradle/test.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bc58a135/gradle/test.gradle -- diff --git a/gradle/test.gradle b/gradle/test.gradle index 5edf09a..baceebd 100644 --- a/gradle/test.gradle +++ b/gradle/test.gradle @@ -214,9 +214,9 @@ subprojects { args[3] = args[3] + matcher[0][1] def workdir = new File(args[3]) -println "--->>> making ${workdir}" +// println "--->>> making ${workdir}" workdir.mkdirs() -//println args +// println args args }
incubator-geode git commit: Fixing Docker image name for parallel test
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666 b69019dab -> 313436932 Fixing Docker image name for parallel test Signed-off-by: Alexander MurmannProject: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/31343693 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/31343693 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/31343693 Branch: refs/heads/feature/GEODE-1666 Commit: 31343693241831922812c9e1b767496931a61dc1 Parents: b69019d Author: Jens Deppe Authored: Fri Jul 22 15:56:12 2016 -0700 Committer: Alexander Murmann Committed: Fri Jul 22 15:56:12 2016 -0700 -- gradle/test.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/31343693/gradle/test.gradle -- diff --git a/gradle/test.gradle b/gradle/test.gradle index 7ec7e46..5edf09a 100644 --- a/gradle/test.gradle +++ b/gradle/test.gradle @@ -137,7 +137,7 @@ subprojects { docker { // base image for creating docker containers that execute the tests - image = 'gemfire/ubuntu-jdk8-docker' + image = 'gemfire/ubuntu-jdk8' // volumes mounted to the containers // in a form: host_dir : container_dir
incubator-geode git commit: Reduce parallel forks to 5
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666 dd7f365a5 -> b69019dab Reduce parallel forks to 5 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b69019da Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b69019da Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b69019da Branch: refs/heads/feature/GEODE-1666 Commit: b69019dabff262e11b28884fbea8fbef9dcef947 Parents: dd7f365 Author: Jens DeppeAuthored: Thu Jul 21 15:52:17 2016 -0700 Committer: Jens Deppe Committed: Thu Jul 21 15:52:17 2016 -0700 -- gradle/test.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b69019da/gradle/test.gradle -- diff --git a/gradle/test.gradle b/gradle/test.gradle index 011c2c6..7ec7e46 100644 --- a/gradle/test.gradle +++ b/gradle/test.gradle @@ -133,7 +133,7 @@ subprojects { } forkEvery 30 -maxParallelForks = 20 +maxParallelForks = 5 docker { // base image for creating docker containers that execute the tests
incubator-geode git commit: Set up correct volume structure
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1666 bee501cb2 -> dd7f365a5 Set up correct volume structure Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dd7f365a Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dd7f365a Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dd7f365a Branch: refs/heads/feature/GEODE-1666 Commit: dd7f365a52e91bb8b8af6539bb6198701469291c Parents: bee501c Author: Jens DeppeAuthored: Thu Jul 21 09:07:50 2016 -0700 Committer: Jens Deppe Committed: Thu Jul 21 09:07:50 2016 -0700 -- gradle/test.gradle | 36 +++- 1 file changed, 27 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dd7f365a/gradle/test.gradle -- diff --git a/gradle/test.gradle b/gradle/test.gradle index 2fdff87..011c2c6 100644 --- a/gradle/test.gradle +++ b/gradle/test.gradle @@ -137,15 +137,32 @@ subprojects { docker { // base image for creating docker containers that execute the tests - image = 'gemfire/centos7-gradle' + image = 'gemfire/ubuntu-jdk8-docker' // volumes mounted to the containers // in a form: host_dir : container_dir - def gradleHome = System.getenv("GRADLE_USER_HOME") - def pwd = System.getenv("PWD") - def java_home = System.getenv("JAVA_HOME") + def pwd = System.getenv('PWD') + def gradleHome = System.getenv('GRADLE_USER_HOME') ?: "${System.getenv('HOME')}/.gradle" volumes = ["${gradleHome}":gradleHome] - volumes << ["${pwd}":pwd] + + // Figure out if we're building Geode or GemFire + if (new File(pwd, 'geode-core').exists()) { +volumes << ["${pwd}":pwd] + } else { +// Assume that our directory structure has 'open/' in the parent of the PWD. +// For example: +// .../gemfire (PWD) +// +--/gemfire-test +// +--/etc +// .../open +// +--/geode-core +// +--/etc +def gemfireDir = new File("${pwd}").getParent() +// Make sure we resolve symlinks by using getCanonicalPath +def geodeDir = new File(gemfireDir, 'open').getCanonicalPath() +volumes << ["${gemfireDir}": gemfireDir] +volumes << ["${geodeDir}": geodeDir] + } // specify the user for starting Gradle test worker // within the container, default to current user @@ -166,10 +183,11 @@ subprojects { j++ } -//if (javaHomeIdx > 0) { -// args.removeAt(javaHomeIdx-1) -// args.removeAt(javaHomeIdx-1) -//} +// Remove JAVA_HOME env variable - it might not be the same as the container needs +if (javaHomeIdx > 0) { + args.removeAt(javaHomeIdx-1) + args.removeAt(javaHomeIdx-1) +} // custom args processing and tweaking // of the docker command starting the testworker inside a container
[2/2] incubator-geode git commit: Revert "GEODE-1463: Legacy OperationContexts do not set the appropriate Shiro"
Revert "GEODE-1463: Legacy OperationContexts do not set the appropriate Shiro" This reverts commit 670fae4b3950fa1ce302461312dd1251d8ea2d8a. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4af70723 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4af70723 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4af70723 Branch: refs/heads/develop Commit: 4af707237ad1095f09a27a60a5813c4280d93f4d Parents: ec466fc Author: Jens DeppeAuthored: Tue Jun 7 13:17:06 2016 -0700 Committer: Jens Deppe Committed: Wed Jun 8 08:12:24 2016 -0700 -- .../operations/CloseCQOperationContext.java | 24 ++- .../operations/DestroyOperationContext.java | 15 +- .../operations/ExecuteCQOperationContext.java | 24 +-- .../ExecuteFunctionOperationContext.java| 45 +++-- .../GetDurableCQsOperationContext.java | 28 ++- .../cache/operations/GetOperationContext.java | 35 +++- .../operations/InterestOperationContext.java| 26 ++- .../operations/InvalidateOperationContext.java | 17 +- .../cache/operations/KeyOperationContext.java | 46 - .../operations/KeySetOperationContext.java | 35 +++- .../operations/KeyValueOperationContext.java| 14 +- .../cache/operations/OperationContext.java | 33 ++-- .../operations/PutAllOperationContext.java | 34 +++- .../cache/operations/PutOperationContext.java | 28 ++- .../cache/operations/QueryOperationContext.java | 86 +--- .../operations/RegionClearOperationContext.java | 14 +- .../RegionCreateOperationContext.java | 28 ++- .../RegionDestroyOperationContext.java | 13 +- .../operations/RegionOperationContext.java | 30 ++- .../RegisterInterestOperationContext.java | 13 +- .../operations/RemoveAllOperationContext.java | 34 +++- .../operations/StopCQOperationContext.java | 24 ++- .../UnregisterInterestOperationContext.java | 13 +- .../internal/GetOperationContextImpl.java | 10 +- .../internal/ResourceOperationContext.java | 128 .../ServerToClientFunctionResultSender.java | 2 +- .../operations/ContainsKeyOperationContext.java | 13 +- .../cache/tier/sockets/BaseCommandQuery.java| 5 +- .../internal/security/GeodeSecurityUtil.java| 36 ++-- .../security/shiro/CustomAuthRealm.java | 12 +- .../internal/security/MBeanServerWrapper.java | 3 +- .../security/ResourceOperationContext.java | 85 .../templates/SampleJsonAuthorization.java | 4 +- .../operations/OperationPartsJUnitTest.java | 195 --- .../ResourceOperationContextJUnitTest.java | 5 +- .../internal/security/TestCommand.java | 19 +- .../codeAnalysis/sanctionedSerializables.txt| 3 +- 37 files changed, 668 insertions(+), 511 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4af70723/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java index b984981..1924605 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java @@ -37,8 +37,28 @@ public class CloseCQOperationContext extends ExecuteCQOperationContext { * @param regionNames *names of regions that are part of the query string */ - public CloseCQOperationContext(String cqName, String queryString, Set regionNames) { -super(OperationCode.CLOSE_CQ, cqName, queryString, regionNames, false); + public CloseCQOperationContext(String cqName, String queryString, + Set regionNames) { +super(cqName, queryString, regionNames, false); + } + + /** + * Return the operation associated with the OperationContext + * object. + * + * @return OperationCode.CLOSE_CQ. + */ + @Override + public OperationCode getOperationCode() { +return OperationCode.CLOSE_CQ; + } + + /** + * True if the context is for post-operation. + */ + @Override + public boolean isPostOperation() { +return false; } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4af70723/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/DestroyOperationContext.java -- diff --git
[1/2] incubator-geode git commit: Revert "GEODE-1463: Legacy OperationContexts do not set the appropriate Shiro"
Repository: incubator-geode Updated Branches: refs/heads/develop ec466fc38 -> 4af707237 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4af70723/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java index 5b07bdf..46c0e1d 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java @@ -22,7 +22,6 @@ import static org.junit.Assert.*; import com.gemstone.gemfire.cache.operations.OperationContext; import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode; import com.gemstone.gemfire.cache.operations.OperationContext.Resource; -import com.gemstone.gemfire.cache.operations.internal.ResourceOperationContext; import com.gemstone.gemfire.test.junit.categories.UnitTest; import org.apache.shiro.authz.permission.WildcardPermission; @@ -50,12 +49,12 @@ public class ResourceOperationContextJUnitTest { @Test public void testConstructor(){ -context = new ResourceOperationContext(); +context = new ResourceOperationContext(null, null, null); assertEquals(Resource.NULL, context.getResource()); assertEquals(OperationCode.NULL, context.getOperationCode()); assertEquals(OperationContext.ALL_REGIONS, context.getRegionName()); -context = new ResourceOperationContext(); +context = new ResourceOperationContext(null, null); assertEquals(Resource.NULL, context.getResource()); assertEquals(OperationCode.NULL, context.getOperationCode()); assertEquals(OperationContext.ALL_REGIONS, context.getRegionName()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4af70723/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java index 0f13246..2ddc6ee 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java @@ -22,7 +22,6 @@ import java.util.List; import com.gemstone.gemfire.cache.operations.OperationContext; -import com.gemstone.gemfire.cache.operations.internal.ResourceOperationContext; import org.apache.shiro.authz.Permission; public class TestCommand { @@ -42,23 +41,23 @@ public class TestCommand { private static List testCommands = new ArrayList<>(); - static { + static{ init(); } - + private final String command; private final OperationContext permission; - + public TestCommand(String command, OperationContext permission) { this.command = command; this.permission = permission; } - + private static void createTestCommand(String command, OperationContext permission) { TestCommand instance = new TestCommand(command, permission); testCommands.add(instance); } - + public String getCommand() { return this.command; } @@ -67,13 +66,13 @@ public class TestCommand { return this.permission; } - public static List getCommands() { + public static List getCommands(){ return testCommands; } - public static List getPermittedCommands(Permission permission) { + public static List getPermittedCommands(Permission permission){ List result = new ArrayList<>(); -for (TestCommand testCommand : testCommands) { +for(TestCommand testCommand:testCommands){ OperationContext cPerm = testCommand.getPermission(); if(cPerm!=null && permission.implies(cPerm)){ result.add(testCommand); @@ -226,5 +225,5 @@ public class TestCommand { createTestCommand("disconnect", null); //Misc commands //createTestCommand("shutdown", clusterManage); - } + }; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4af70723/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt -- diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt index 8ea91f5..2147219 100755 --- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt +++
incubator-geode git commit: GEODE-1450: Move ExampleJSONAuthorization out of 'test' and into 'main'
Repository: incubator-geode Updated Branches: refs/heads/develop d24a5fb13 -> 1aa39174d GEODE-1450: Move ExampleJSONAuthorization out of 'test' and into 'main' Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1aa39174 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1aa39174 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1aa39174 Branch: refs/heads/develop Commit: 1aa39174daa8ab2b2017013a62ff297fda7362e4 Parents: d24a5fb Author: Jens DeppeAuthored: Thu Jun 2 10:46:59 2016 -0700 Committer: Jens Deppe Committed: Thu Jun 2 10:46:59 2016 -0700 -- .../gemfire/security/templates/SampleJsonAuthorization.java | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1aa39174/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java b/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java index 5723ea5..dca64e7 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java @@ -178,11 +178,10 @@ public class SampleJsonAuthorization implements AccessControl, Authenticator { for (JsonNode op : r.get("operationsAllowed")) { String[] parts = op.asText().split(":"); -if (regionNames == null) { - role.permissions.add(new ResourceOperationContext(parts[0], parts[1], "*", false)); -} else { - role.permissions.add(new ResourceOperationContext(parts[0], parts[1], regionNames, false)); -} +String resourcePart = (parts.length > 0) ? parts[0] : null; +String operationPart = (parts.length > 1) ? parts[1] : null; +String regionPart = (regionNames != null) ? regionNames : "*"; +role.permissions.add(new ResourceOperationContext(resourcePart, operationPart, regionPart, false)); } roleMap.put(role.name, role);
incubator-geode git commit: GEODE-1450: Move ExampleJSONAuthorization out of 'test' and into 'main'
Repository: incubator-geode Updated Branches: refs/heads/develop 653eaf28c -> d24a5fb13 GEODE-1450: Move ExampleJSONAuthorization out of 'test' and into 'main' - This also renames the class to SampleJsonAuthorization (it's already in an 'examples' package so I figured the original name was a bit redundant). - Once we have an 'examples' submodule this class could be refactored a bit more and moved there (or simply extended there with a thin wrapper). Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d24a5fb1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d24a5fb1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d24a5fb1 Branch: refs/heads/develop Commit: d24a5fb1329a9bcc7f6148a883fef298da2c4a8e Parents: 653eaf2 Author: Jens DeppeAuthored: Wed May 25 15:44:58 2016 -0700 Committer: Jens Deppe Committed: Thu Jun 2 10:44:08 2016 -0700 -- .../templates/SampleJsonAuthorization.java | 262 +++ .../security/ExampleJSONAuthorization.java | 193 -- .../internal/security/JSONAuthorization.java| 175 + 3 files changed, 264 insertions(+), 366 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d24a5fb1/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java b/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java new file mode 100644 index 000..5723ea5 --- /dev/null +++ b/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SampleJsonAuthorization.java @@ -0,0 +1,262 @@ +/* + * 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.security.templates; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.gemstone.gemfire.LogWriter; +import com.gemstone.gemfire.cache.Cache; +import com.gemstone.gemfire.cache.operations.OperationContext; +import com.gemstone.gemfire.cache.operations.internal.ResourceOperationContext; +import com.gemstone.gemfire.distributed.DistributedMember; +import com.gemstone.gemfire.internal.logging.LogService; +import com.gemstone.gemfire.management.internal.security.ResourceConstants; +import com.gemstone.gemfire.security.AccessControl; +import com.gemstone.gemfire.security.AuthenticationFailedException; +import com.gemstone.gemfire.security.Authenticator; +import com.gemstone.gemfire.security.NotAuthorizedException; +import org.apache.commons.io.IOUtils; + +import javax.management.remote.JMXPrincipal; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; +import java.security.Principal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; + +/** + * This class provides a sample implementation for authentication and authorization via the {@link AccessControl} + * and {@link Authenticator} interfaces. + * + * In order to use it, a Geode member must be started with the following properties: + * + * + * security-client-authenticator = com.gemstone.gemfire.security.examples.SampleJsonAuthorization.create + * security-client-accessor = com.gemstone.gemfire.security.examples.SampleJsonAuthorization.create + * + * + * The class is initialized with a JSON file called {@code security.json}. This file must exist on the classpath, + * so members should be started with an appropriate {@code --classpath} option. + * + * The format of the file is as follows: + * + * { + * "roles": [ + * { + * "name":
[1/2] incubator-geode git commit: GEODE-1463: Legacy OperationContexts do not set the appropriate Shiro permission tuple
Repository: incubator-geode Updated Branches: refs/heads/develop 557fae159 -> 670fae4b3 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/670fae4b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java index fcbf04e..cb0507a 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.gemstone.gemfire.LogWriter; import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.operations.OperationContext; +import com.gemstone.gemfire.cache.operations.internal.ResourceOperationContext; import com.gemstone.gemfire.distributed.DistributedMember; import com.gemstone.gemfire.internal.logging.LogService; import com.gemstone.gemfire.security.AccessControl; @@ -124,9 +125,9 @@ public class JSONAuthorization implements AccessControl, Authenticator { for (JsonNode op : r.get("operationsAllowed")) { String[] parts = op.asText().split(":"); if (regionNames == null) { - role.permissions.add(new ResourceOperationContext(parts[0], parts[1], "*")); + role.permissions.add(new ResourceOperationContext(parts[0], parts[1], "*", false)); } else { - role.permissions.add(new ResourceOperationContext(parts[0], parts[1], regionNames)); + role.permissions.add(new ResourceOperationContext(parts[0], parts[1], regionNames, false)); } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/670fae4b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java index 46c0e1d..5b07bdf 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContextJUnitTest.java @@ -22,6 +22,7 @@ import static org.junit.Assert.*; import com.gemstone.gemfire.cache.operations.OperationContext; import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode; import com.gemstone.gemfire.cache.operations.OperationContext.Resource; +import com.gemstone.gemfire.cache.operations.internal.ResourceOperationContext; import com.gemstone.gemfire.test.junit.categories.UnitTest; import org.apache.shiro.authz.permission.WildcardPermission; @@ -49,12 +50,12 @@ public class ResourceOperationContextJUnitTest { @Test public void testConstructor(){ -context = new ResourceOperationContext(null, null, null); +context = new ResourceOperationContext(); assertEquals(Resource.NULL, context.getResource()); assertEquals(OperationCode.NULL, context.getOperationCode()); assertEquals(OperationContext.ALL_REGIONS, context.getRegionName()); -context = new ResourceOperationContext(null, null); +context = new ResourceOperationContext(); assertEquals(Resource.NULL, context.getResource()); assertEquals(OperationCode.NULL, context.getOperationCode()); assertEquals(OperationContext.ALL_REGIONS, context.getRegionName()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/670fae4b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java index 2ddc6ee..0f13246 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestCommand.java @@ -22,6 +22,7 @@ import java.util.List; import com.gemstone.gemfire.cache.operations.OperationContext; +import com.gemstone.gemfire.cache.operations.internal.ResourceOperationContext; import org.apache.shiro.authz.Permission; public class TestCommand { @@ -41,23 +42,23 @@ public class TestCommand { private static List testCommands = new ArrayList<>(); - static{ + static { init(); } - + private final String
[2/2] incubator-geode git commit: GEODE-1463: Legacy OperationContexts do not set the appropriate Shiro permission tuple
GEODE-1463: Legacy OperationContexts do not set the appropriate Shiro permission tuple - Moved ResourceOperationContext into a 'public' package. - Converted OperationContext into an interface. - Cleaned up the hierarchy of everything that previously extended OperationContext. - Marked GetOperationContext as abstract seeing that GetOperationContextImpl extends it and there are no uses of GetOperationContext anywhere. (So why does it still exist?). Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/670fae4b Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/670fae4b Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/670fae4b Branch: refs/heads/develop Commit: 670fae4b3950fa1ce302461312dd1251d8ea2d8a Parents: 557fae1 Author: Jens DeppeAuthored: Tue May 31 07:44:25 2016 -0700 Committer: Jens Deppe Committed: Thu Jun 2 10:08:25 2016 -0700 -- .../operations/CloseCQOperationContext.java | 24 +-- .../operations/DestroyOperationContext.java | 15 +- .../operations/ExecuteCQOperationContext.java | 24 ++- .../ExecuteFunctionOperationContext.java| 45 ++--- .../GetDurableCQsOperationContext.java | 28 +-- .../cache/operations/GetOperationContext.java | 35 +--- .../operations/InterestOperationContext.java| 26 +-- .../operations/InvalidateOperationContext.java | 17 +- .../cache/operations/KeyOperationContext.java | 46 + .../operations/KeySetOperationContext.java | 35 +--- .../operations/KeyValueOperationContext.java| 14 +- .../cache/operations/OperationContext.java | 33 ++-- .../operations/PutAllOperationContext.java | 34 +--- .../cache/operations/PutOperationContext.java | 28 +-- .../cache/operations/QueryOperationContext.java | 86 +++- .../operations/RegionClearOperationContext.java | 14 +- .../RegionCreateOperationContext.java | 28 +-- .../RegionDestroyOperationContext.java | 13 +- .../operations/RegionOperationContext.java | 30 +-- .../RegisterInterestOperationContext.java | 13 +- .../operations/RemoveAllOperationContext.java | 34 +--- .../operations/StopCQOperationContext.java | 24 +-- .../UnregisterInterestOperationContext.java | 13 +- .../internal/GetOperationContextImpl.java | 10 +- .../internal/ResourceOperationContext.java | 128 .../ServerToClientFunctionResultSender.java | 2 +- .../operations/ContainsKeyOperationContext.java | 13 +- .../cache/tier/sockets/BaseCommandQuery.java| 5 +- .../internal/security/GeodeSecurityUtil.java| 36 ++-- .../security/shiro/CustomAuthRealm.java | 12 +- .../internal/security/MBeanServerWrapper.java | 3 +- .../security/ResourceOperationContext.java | 85 .../operations/OperationPartsJUnitTest.java | 195 +++ .../security/ExampleJSONAuthorization.java | 5 +- .../internal/security/JSONAuthorization.java| 5 +- .../ResourceOperationContextJUnitTest.java | 5 +- .../internal/security/TestCommand.java | 19 +- .../codeAnalysis/sanctionedSerializables.txt| 3 +- 38 files changed, 515 insertions(+), 670 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/670fae4b/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java index 1924605..b984981 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/CloseCQOperationContext.java @@ -37,28 +37,8 @@ public class CloseCQOperationContext extends ExecuteCQOperationContext { * @param regionNames *names of regions that are part of the query string */ - public CloseCQOperationContext(String cqName, String queryString, - Set regionNames) { -super(cqName, queryString, regionNames, false); - } - - /** - * Return the operation associated with the OperationContext - * object. - * - * @return OperationCode.CLOSE_CQ. - */ - @Override - public OperationCode getOperationCode() { -return OperationCode.CLOSE_CQ; - } - - /** - * True if the context is for post-operation. - */ - @Override - public boolean isPostOperation() { -return false; + public CloseCQOperationContext(String cqName, String queryString, Set regionNames) { +super(OperationCode.CLOSE_CQ,
incubator-geode git commit: GEODE-1185: typo in gfsh help on alter disk-store
Repository: incubator-geode Updated Branches: refs/heads/develop b42d6e991 -> 557fae159 GEODE-1185: typo in gfsh help on alter disk-store Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/557fae15 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/557fae15 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/557fae15 Branch: refs/heads/develop Commit: 557fae159707d00d7e7ea2cab9c629dca6d26baf Parents: b42d6e9 Author: Jens DeppeAuthored: Wed Jun 1 12:04:33 2016 -0700 Committer: Jens Deppe Committed: Thu Jun 2 07:24:06 2016 -0700 -- .../gemfire/management/internal/cli/i18n/CliStrings.java | 2 +- .../internal/cli/commands/golden-help-offline.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/557fae15/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java index 4228373..cc80de8 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java @@ -194,7 +194,7 @@ public class CliStrings { public static final String ALTER_DISK_STORE__REGIONNAME__HELP = "Name/Path of the region in the disk store to alter."; public static final String ALTER_DISK_STORE__DISKDIRS = "disk-dirs"; public static final String ALTER_DISK_STORE__DISKDIRS__HELP = "Directories where data for the disk store was previously written."; - public static final String ALTER_DISK_STORE__LRU__EVICTION__ALGORITHM = "lru-algorthm"; + public static final String ALTER_DISK_STORE__LRU__EVICTION__ALGORITHM = "lru-algorithm"; public static final String ALTER_DISK_STORE__LRU__EVICTION__ALGORITHM__HELP = "Least recently used eviction algorithm. Valid values are: none, lru-entry-count, lru-heap-percentage and lru-memory-size."; public static final String ALTER_DISK_STORE__LRU__EVICTION__ACTION = "lru-action"; public static final String ALTER_DISK_STORE__LRU__EVICTION__ACTION__HELP = "Action to take when evicting entries from the region. Valid values are: none, overflow-to-disk and local-destroy."; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/557fae15/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties -- diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties index 74db393..3c0d388 100644 --- a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties +++ b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties @@ -48,7 +48,7 @@ SYNOPSIS\n\ SYNTAX\n\ \ \ \ \ alter disk-store --name=value --region=value --disk-dirs=value(,value)* [--compressor(=value)?]\n\ \ \ \ \ [--concurrency-level=value] [--enable-statistics=value] [--initial-capacity=value]\n\ -\ \ \ \ [--load-factor=value] [--lru-action=value] [--lru-algorthm=value] [--lru-limit=value]\n\ +\ \ \ \ [--load-factor=value] [--lru-action=value] [--lru-algorithm=value] [--lru-limit=value]\n\ \ \ \ \ [--off-heap=value] [--remove(=value)?]\n\ PARAMETERS\n\ \ \ \ \ name\n\ @@ -85,7 +85,7 @@ PARAMETERS\n\ \ \ \ \ \ \ \ \ Action to take when evicting entries from the region. Valid values are: none,\n\ \ \ \ \ \ \ \ \ overflow-to-disk and local-destroy.\n\ \ \ \ \ \ \ \ \ Required: false\n\ -\ \ \ \ lru-algorthm\n\ +\ \ \ \ lru-algorithm\n\ \ \ \ \ \ \ \ \ Least recently used eviction algorithm. Valid values are: none, lru-entry-count,\n\ \ \ \ \ \ \ \ \ lru-heap-percentage and lru-memory-size.\n\ \ \ \ \ \ \ \ \ Required: false\n\
incubator-geode git commit: GEODE-1454: Have "region" attribute, in JSONAuthorization json file be an array
Repository: incubator-geode Updated Branches: refs/heads/develop c427eb3a2 -> 03246b404 GEODE-1454: Have "region" attribute, in JSONAuthorization json file be an array - Also converted to Jackson. Be gone org.json!! Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/03246b40 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/03246b40 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/03246b40 Branch: refs/heads/develop Commit: 03246b404efd2161ec3d3b55ea319599de33ecd3 Parents: c427eb3 Author: Jens DeppeAuthored: Wed May 25 13:25:39 2016 -0700 Committer: Jens Deppe Committed: Tue May 31 08:58:03 2016 -0700 -- .../internal/security/JSONAuthorization.java| 118 ++- .../internal/security/cacheServer.json | 4 +- 2 files changed, 62 insertions(+), 60 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03246b40/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java index e14d1de..ac81c76 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java @@ -16,19 +16,8 @@ */ package com.gemstone.gemfire.management.internal.security; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.security.Principal; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import javax.management.remote.JMXPrincipal; - +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; import com.gemstone.gemfire.LogWriter; import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.operations.OperationContext; @@ -40,9 +29,20 @@ import com.gemstone.gemfire.security.Authenticator; import com.gemstone.gemfire.security.NotAuthorizedException; import com.gemstone.gemfire.util.test.TestUtil; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import javax.management.remote.JMXPrincipal; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.security.Principal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; public class JSONAuthorization implements AccessControl, Authenticator { @@ -60,75 +60,78 @@ public class JSONAuthorization implements AccessControl, Authenticator { private static Map acl = null; - public static JSONAuthorization create() throws IOException, JSONException { + public static JSONAuthorization create() throws IOException { return new JSONAuthorization(); } - public JSONAuthorization() throws IOException, JSONException {} + public JSONAuthorization() throws IOException { + } - public JSONAuthorization(String jsonFileName) throws IOException, JSONException { + public JSONAuthorization(String jsonFileName) throws IOException { setUpWithJsonFile(jsonFileName); } - public static void setUpWithJsonFile(String jsonFileName) throws IOException, JSONException { + public static void setUpWithJsonFile(String jsonFileName) throws IOException { String json = readFile(TestUtil.getResourcePath(JSONAuthorization.class, jsonFileName)); readSecurityDescriptor(json); } - private static void readSecurityDescriptor(String json) throws IOException, JSONException { -JSONObject jsonBean = new JSONObject(json); + private static void readSecurityDescriptor(String json) throws IOException { +ObjectMapper mapper = new ObjectMapper(); +JsonNode jsonNode = mapper.readTree(json); acl = new HashMap<>(); -Map roleMap = readRoles(jsonBean); -readUsers(acl, jsonBean, roleMap); +Map roleMap = readRoles(jsonNode); +readUsers(acl, jsonNode, roleMap); } - private static void readUsers(Map acl, JSONObject jsonBean, Map roleMap) - throws JSONException { -JSONArray array = jsonBean.getJSONArray("users"); -for (int i = 0; i <
[incubator-geode] Git Push Summary
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1455 [deleted] c427eb3a2
incubator-geode git commit: GEODE-1455: Add SecurityTest JUnit category to outstanding gfsh / JMX security tests
Repository: incubator-geode Updated Branches: refs/heads/develop fa3a93750 -> c427eb3a2 GEODE-1455: Add SecurityTest JUnit category to outstanding gfsh / JMX security tests Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c427eb3a Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c427eb3a Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c427eb3a Branch: refs/heads/develop Commit: c427eb3a204957dc0543d6dd8eabf6feb8319804 Parents: fa3a937 Author: Jens DeppeAuthored: Wed May 25 13:24:08 2016 -0700 Committer: Jens Deppe Committed: Tue May 31 08:49:55 2016 -0700 -- .../management/internal/security/CliCommandsSecurityTest.java | 3 ++- .../management/internal/security/DataCommandsSecurityTest.java | 5 +++-- .../security/GeodeSecurityUtilWithIniFileJUnitTest.java | 3 ++- .../management/internal/security/MultiUserDUnitTest.java| 3 ++- .../gemstone/gemfire/test/junit/categories/SecurityTest.java| 2 +- .../internal/cli/commands/CommandOverHttpDUnitTest.java | 3 ++- .../internal/security/GfshCommandsOverHttpSecurityTest.java | 3 ++- 7 files changed, 14 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java index b4864e9..5edca36 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java @@ -27,6 +27,7 @@ import com.gemstone.gemfire.management.MemberMXBean; import com.gemstone.gemfire.security.NotAuthorizedException; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import com.gemstone.gemfire.test.junit.categories.SecurityTest; import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; @@ -36,7 +37,7 @@ import org.junit.experimental.categories.Category; /** */ -@Category(IntegrationTest.class) +@Category({IntegrationTest.class, SecurityTest.class}) public class CliCommandsSecurityTest { private static int jmxManagerPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java index 9c9b4fc..01575b1 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java @@ -22,13 +22,14 @@ import com.gemstone.gemfire.internal.AvailablePort; import com.gemstone.gemfire.management.MemberMXBean; import com.gemstone.gemfire.security.GemFireSecurityException; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import com.gemstone.gemfire.test.junit.categories.SecurityTest; import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; -@Category(IntegrationTest.class) +@Category({IntegrationTest.class, SecurityTest.class}) public class DataCommandsSecurityTest { private static int jmxManagerPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); @@ -66,7 +67,7 @@ public class DataCommandsSecurityTest { // dataUser has all the permissions granted, but not to region2 (only to region1) @JMXConnectionConfiguration(user = "region1-user", password = "1234567") @Test - public void testRegionAcess(){ + public void testRegionAccess(){ assertThatThrownBy(() -> bean.processCommand("rebalance --include-region=region2")).isInstanceOf(GemFireSecurityException.class) .hasMessageContaining(TestCommand.dataManage.toString()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
incubator-geode git commit: GEODE-1455: Add SecurityTest JUnit category to outstanding gfsh / JMX security tests
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1455 [created] c427eb3a2 GEODE-1455: Add SecurityTest JUnit category to outstanding gfsh / JMX security tests Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c427eb3a Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c427eb3a Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c427eb3a Branch: refs/heads/feature/GEODE-1455 Commit: c427eb3a204957dc0543d6dd8eabf6feb8319804 Parents: fa3a937 Author: Jens DeppeAuthored: Wed May 25 13:24:08 2016 -0700 Committer: Jens Deppe Committed: Tue May 31 08:49:55 2016 -0700 -- .../management/internal/security/CliCommandsSecurityTest.java | 3 ++- .../management/internal/security/DataCommandsSecurityTest.java | 5 +++-- .../security/GeodeSecurityUtilWithIniFileJUnitTest.java | 3 ++- .../management/internal/security/MultiUserDUnitTest.java| 3 ++- .../gemstone/gemfire/test/junit/categories/SecurityTest.java| 2 +- .../internal/cli/commands/CommandOverHttpDUnitTest.java | 3 ++- .../internal/security/GfshCommandsOverHttpSecurityTest.java | 3 ++- 7 files changed, 14 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java index b4864e9..5edca36 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java @@ -27,6 +27,7 @@ import com.gemstone.gemfire.management.MemberMXBean; import com.gemstone.gemfire.security.NotAuthorizedException; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import com.gemstone.gemfire.test.junit.categories.SecurityTest; import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; @@ -36,7 +37,7 @@ import org.junit.experimental.categories.Category; /** */ -@Category(IntegrationTest.class) +@Category({IntegrationTest.class, SecurityTest.class}) public class CliCommandsSecurityTest { private static int jmxManagerPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java index 9c9b4fc..01575b1 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java @@ -22,13 +22,14 @@ import com.gemstone.gemfire.internal.AvailablePort; import com.gemstone.gemfire.management.MemberMXBean; import com.gemstone.gemfire.security.GemFireSecurityException; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import com.gemstone.gemfire.test.junit.categories.SecurityTest; import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; -@Category(IntegrationTest.class) +@Category({IntegrationTest.class, SecurityTest.class}) public class DataCommandsSecurityTest { private static int jmxManagerPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); @@ -66,7 +67,7 @@ public class DataCommandsSecurityTest { // dataUser has all the permissions granted, but not to region2 (only to region1) @JMXConnectionConfiguration(user = "region1-user", password = "1234567") @Test - public void testRegionAcess(){ + public void testRegionAccess(){ assertThatThrownBy(() -> bean.processCommand("rebalance --include-region=region2")).isInstanceOf(GemFireSecurityException.class) .hasMessageContaining(TestCommand.dataManage.toString()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
[3/3] incubator-geode git commit: GEODE-1410: Fix artifacts published for modules
GEODE-1410: Fix artifacts published for modules Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/46eeb39c Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/46eeb39c Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/46eeb39c Branch: refs/heads/develop Commit: 46eeb39cef78ce6c0e1c0b0546a14eb64cc65c9b Parents: d757521 Author: Jens DeppeAuthored: Tue May 24 10:54:25 2016 -0700 Committer: Jens Deppe Committed: Tue May 24 14:30:20 2016 -0700 -- extensions/geode-modules-assembly/build.gradle | 5 +- .../geode-modules-session-internal/build.gradle | 25 + .../internal/common/AbstractSessionCache.java | 102 .../session/internal/common/CacheProperty.java | 65 +++ .../common/ClientServerSessionCache.java| 186 +++ .../internal/common/PeerToPeerSessionCache.java | 184 +++ .../session/internal/common/SessionCache.java | 68 +++ .../common/SessionExpirationCacheListener.java | 53 ++ .../session/internal/filter/Constants.java | 30 ++ .../internal/filter/DummySessionManager.java| 132 + .../internal/filter/GemfireHttpSession.java | 526 +++ .../filter/GemfireSessionException.java | 41 ++ .../internal/filter/GemfireSessionManager.java | 511 ++ .../internal/filter/ListenerEventType.java | 75 +++ .../session/internal/filter/SessionManager.java | 110 .../AbstractDeltaSessionAttributes.java | 107 .../attributes/AbstractSessionAttributes.java | 188 +++ .../internal/filter/attributes/DeltaEvent.java | 119 + .../DeltaQueuedSessionAttributes.java | 94 .../attributes/DeltaSessionAttributes.java | 75 +++ .../attributes/ImmediateSessionAttributes.java | 68 +++ .../attributes/QueuedSessionAttributes.java | 65 +++ .../filter/attributes/SessionAttributes.java| 120 + .../filter/util/NamedThreadFactory.java | 68 +++ .../filter/util/ThreadLocalSession.java | 39 ++ .../internal/filter/util/TypeAwareMap.java | 50 ++ .../session/internal/jmx/SessionStatistics.java | 78 +++ .../internal/jmx/SessionStatisticsMXBean.java | 30 ++ extensions/geode-modules-session/build.gradle | 18 +- .../internal/common/AbstractSessionCache.java | 102 .../session/internal/common/CacheProperty.java | 65 --- .../common/ClientServerSessionCache.java| 186 --- .../internal/common/PeerToPeerSessionCache.java | 184 --- .../session/internal/common/SessionCache.java | 68 --- .../common/SessionExpirationCacheListener.java | 53 -- .../session/internal/filter/Constants.java | 30 -- .../internal/filter/DummySessionManager.java| 132 - .../internal/filter/GemfireHttpSession.java | 526 --- .../filter/GemfireSessionException.java | 41 -- .../internal/filter/GemfireSessionManager.java | 511 -- .../internal/filter/ListenerEventType.java | 75 --- .../session/internal/filter/SessionManager.java | 110 .../AbstractDeltaSessionAttributes.java | 107 .../attributes/AbstractSessionAttributes.java | 188 --- .../internal/filter/attributes/DeltaEvent.java | 119 - .../DeltaQueuedSessionAttributes.java | 94 .../attributes/DeltaSessionAttributes.java | 75 --- .../attributes/ImmediateSessionAttributes.java | 68 --- .../attributes/QueuedSessionAttributes.java | 65 --- .../filter/attributes/SessionAttributes.java| 120 - .../filter/util/NamedThreadFactory.java | 68 --- .../filter/util/ThreadLocalSession.java | 39 -- .../internal/filter/util/TypeAwareMap.java | 50 -- .../session/internal/jmx/SessionStatistics.java | 78 --- .../internal/jmx/SessionStatisticsMXBean.java | 30 -- settings.gradle | 1 + 56 files changed, 3213 insertions(+), 3204 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/46eeb39c/extensions/geode-modules-assembly/build.gradle -- diff --git a/extensions/geode-modules-assembly/build.gradle b/extensions/geode-modules-assembly/build.gradle index 8109466..412ba09 100644 --- a/extensions/geode-modules-assembly/build.gradle +++ b/extensions/geode-modules-assembly/build.gradle @@ -167,9 +167,8 @@ task distAppServer(type: Zip, dependsOn: ':extensions/geode-modules-session:asse archiveName = "Apache_Geode_Modules-${version}-AppServer.zip" into('lib') { -// Use a closure here so that the evaluation is deferred. Without this the 'internal' -// jar won't be picked up. -from {
[1/3] incubator-geode git commit: GEODE-1410: Fix artifacts published for modules
Repository: incubator-geode Updated Branches: refs/heads/develop d75752146 -> 46eeb39ce http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/46eeb39c/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionException.java -- diff --git a/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionException.java b/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionException.java deleted file mode 100644 index 3ce81be..000 --- a/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionException.java +++ /dev/null @@ -1,41 +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.modules.session.internal.filter; - -/** - * Exception class for Gemfire Session Cache specific exceptions. - */ -public class GemfireSessionException extends Exception { - - public GemfireSessionException() { -super(); - } - - public GemfireSessionException(String message) { -super(message); - } - - public GemfireSessionException(String message, Throwable cause) { -super(message, cause); - } - - public GemfireSessionException(Throwable cause) { -super(cause); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/46eeb39c/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java -- diff --git a/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java b/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java deleted file mode 100644 index a3d3c10..000 --- a/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java +++ /dev/null @@ -1,511 +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.modules.session.internal.filter; - -import com.gemstone.gemfire.cache.CacheClosedException; -import com.gemstone.gemfire.cache.CacheFactory; -import com.gemstone.gemfire.cache.EntryNotFoundException; -import com.gemstone.gemfire.cache.control.ResourceManager; -import com.gemstone.gemfire.internal.cache.GemFireCacheImpl; -import com.gemstone.gemfire.modules.session.bootstrap.AbstractCache; -import com.gemstone.gemfire.modules.session.bootstrap.ClientServerCache; -import com.gemstone.gemfire.modules.session.bootstrap.LifecycleTypeAdapter; -import com.gemstone.gemfire.modules.session.bootstrap.PeerToPeerCache; -import com.gemstone.gemfire.modules.session.internal.common.CacheProperty; -import com.gemstone.gemfire.modules.session.internal.common.ClientServerSessionCache; -import com.gemstone.gemfire.modules.session.internal.common.PeerToPeerSessionCache; -import com.gemstone.gemfire.modules.session.internal.common.SessionCache; -import com.gemstone.gemfire.modules.session.internal.filter.attributes.AbstractSessionAttributes; -import com.gemstone.gemfire.modules.session.internal.filter.attributes.DeltaQueuedSessionAttributes; -import
[2/3] incubator-geode git commit: GEODE-1410: Fix artifacts published for modules
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/46eeb39c/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractSessionAttributes.java -- diff --git a/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractSessionAttributes.java b/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractSessionAttributes.java new file mode 100644 index 000..c4af041 --- /dev/null +++ b/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/attributes/AbstractSessionAttributes.java @@ -0,0 +1,188 @@ +/* +* 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.modules.session.internal.filter.attributes; + +import com.gemstone.gemfire.DataSerializer; +import com.gemstone.gemfire.internal.util.BlobHelper; +import com.gemstone.gemfire.modules.session.internal.filter.GemfireHttpSession; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Abstract implementation for attributes. Should be sub-classed to provide + * differing implementations for synchronous or delta propagation. The backing + * store used is defined by the session manager. + */ +public abstract class AbstractSessionAttributes implements SessionAttributes { + + private static final Logger LOG = + LoggerFactory.getLogger(AbstractSessionAttributes.class.getName()); + + /** + * Internal attribute store. + */ + protected Mapattributes = + Collections.synchronizedMap(new HashMap ()); + + /** + * The session to which these attributes belong + */ + protected transient GemfireHttpSession session; + + /** + * The last accessed time + */ + protected long lastAccessedTime; + + /** + * The maximum inactive interval. Default is 1800 seconds. + */ + protected int maxInactiveInterval = 60 * 30; + + /** + * The JVM Id who last committed these attributes + */ + protected String jvmOwnerId; + + /** + * {@inheritDoc} + */ + @Override + public void setSession(GemfireHttpSession session) { +this.session = session; + } + + /** + * {@inheritDoc} The actual de-serialization of any domain objects is deferred + * until the point at which they are actually retrieved by the application + * layer. + */ + @Override + public Object getAttribute(String name) { +Object value = attributes.get(name); + +// If the value is a byte[] (meaning it came from the server), +// deserialize it and re-add it to attributes map before returning it. +if (value instanceof byte[]) { + try { +value = BlobHelper.deserializeBlob((byte[]) value); +attributes.put(name, value); + } catch (Exception iox) { +LOG.error("Attribute '" + name + +" contains a byte[] that cannot be deserialized due " ++ "to the following exception", iox); + } +} + +return value; + } + + /** + * {@inheritDoc} + */ + @Override + public Set getAttributeNames() { +return attributes.keySet(); + } + + /** + * {@inheritDoc} + + */ + @Override + public void setMaxInactiveInterval(int interval) { +maxInactiveInterval = interval; + } + + @Override + public int getMaxIntactiveInterval() { +return maxInactiveInterval; + } + + @Override + public void setLastAccessedTime(long time) { +lastAccessedTime = time; + } + + @Override + public long getLastAccessedTime() { +return lastAccessedTime; + } + + /** + * {@inheritDoc} This method calls back into the session to flush the whole + * session including its attributes. + */ + @Override + public void flush() { +session.putInRegion(); + } + + /** + * Use DeltaEvents to propagate the actual attribute data - DeltaEvents turn + * the values into byte arrays
incubator-geode git commit: GEODE-1417: geode-web:war task does not include the necessary web components from core
Repository: incubator-geode Updated Branches: refs/heads/develop 45a4ef29f -> 6483ae381 GEODE-1417: geode-web:war task does not include the necessary web components from core Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6483ae38 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6483ae38 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6483ae38 Branch: refs/heads/develop Commit: 6483ae381e87c3d1f8b1eae7d670288d130aae1b Parents: 45a4ef2 Author: Jens DeppeAuthored: Thu May 19 10:43:19 2016 -0700 Committer: Jens Deppe Committed: Tue May 24 07:39:45 2016 -0700 -- geode-web/build.gradle | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6483ae38/geode-web/build.gradle -- diff --git a/geode-web/build.gradle b/geode-web/build.gradle index 228751b..75844d3 100755 --- a/geode-web/build.gradle +++ b/geode-web/build.gradle @@ -73,14 +73,16 @@ idea.module.iml { } distributedTest { - dependsOn ':geode-core:webJar', 'war' + dependsOn war } integrationTest { - dependsOn ':geode-core:webJar', 'war' + dependsOn war } war { - classpath configurations.runtime + dependsOn ':geode-core:webJar' + + classpath configurations.runtime classpath project(':geode-core').webJar.archivePath }
incubator-geode git commit: GEODE-695: Unable to export cluster config on Windows
Repository: incubator-geode Updated Branches: refs/heads/develop bbc402723 -> 08c39c355 GEODE-695: Unable to export cluster config on Windows - This also fixes GEODE-312: ZipUtilsJUnitTest testZipUtils fails with IOException on Windows Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/08c39c35 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/08c39c35 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/08c39c35 Branch: refs/heads/develop Commit: 08c39c3555b668fd1a86d96ed61b46f43d2552af Parents: bbc4027 Author: Jens DeppeAuthored: Fri May 20 11:20:41 2016 -0700 Committer: Jens Deppe Committed: Mon May 23 08:05:28 2016 -0700 -- .../cli/functions/ExportSharedConfigurationFunction.java| 9 +++-- .../management/internal/configuration/utils/ZipUtils.java | 1 - .../internal/configuration/ZipUtilsJUnitTest.java | 2 -- 3 files changed, 3 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/08c39c35/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ExportSharedConfigurationFunction.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ExportSharedConfigurationFunction.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ExportSharedConfigurationFunction.java index 4b69ee9..38520f6 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ExportSharedConfigurationFunction.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ExportSharedConfigurationFunction.java @@ -17,9 +17,7 @@ package com.gemstone.gemfire.management.internal.cli.functions; import java.io.File; -import java.sql.Timestamp; -import java.text.SimpleDateFormat; -import java.util.Date; +import java.util.UUID; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; @@ -44,9 +42,8 @@ public class ExportSharedConfigurationFunction extends FunctionAdapter if (locator.isSharedConfigurationRunning()) { SharedConfiguration sc = locator.getSharedConfiguration(); - Date date= new Date(); - new SimpleDateFormat("MMddhhmm").format(new Timestamp(date.getTime())); - String zipFileName = CliStrings.format(CliStrings.EXPORT_SHARED_CONFIG__FILE__NAME, new Timestamp(date.getTime()).toString()) ; + + String zipFileName = CliStrings.format(CliStrings.EXPORT_SHARED_CONFIG__FILE__NAME, UUID.randomUUID()); String targetFilePath = FilenameUtils.concat(sc.getSharedConfigurationDirPath(), zipFileName); try { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/08c39c35/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/ZipUtils.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/ZipUtils.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/ZipUtils.java index 18b4949..238e20b 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/ZipUtils.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/ZipUtils.java @@ -62,7 +62,6 @@ public class ZipUtils { if (child.isDirectory()) { fileStack.push(child); - name = name.endsWith(File.separator) ? name : name + File.separator; zos.putNextEntry(new ZipEntry(name)); } else { if (!name.endsWith("zip")) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/08c39c35/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java index 595bdeb..993dcc8 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/ZipUtilsJUnitTest.java @@ -33,8 +33,6 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest; /** * JUnit Test for {@link ZipUtils} - * - * TODO: this is broken on Windows: see bug #52036 (GEODE-312) */ @Category(IntegrationTest.class) public class
incubator-geode git commit: GEODE-1243: Missed fixing one test for parameterization
Repository: incubator-geode Updated Branches: refs/heads/develop 2dd3d9065 -> f05e87d27 GEODE-1243: Missed fixing one test for parameterization Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f05e87d2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f05e87d2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f05e87d2 Branch: refs/heads/develop Commit: f05e87d2710cf26bb546109962a99c849cef973e Parents: 2dd3d90 Author: Jens DeppeAuthored: Fri May 20 08:11:09 2016 -0700 Committer: Jens Deppe Committed: Fri May 20 08:11:09 2016 -0700 -- .../distributed/LocatorLauncherAssemblyIntegrationTest.java | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f05e87d2/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java -- diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java index 332cbf4..84d4aba 100644 --- a/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java +++ b/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java @@ -27,10 +27,13 @@ import com.gemstone.gemfire.internal.process.ProcessUtils; import com.gemstone.gemfire.management.ManagementService; import com.gemstone.gemfire.management.ManagerMXBean; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; import java.io.File; @@ -40,6 +43,8 @@ import static org.junit.Assert.*; * These tests are part of assembly as they require the REST war file to be present. */ @Category(IntegrationTest.class) +@RunWith(Parameterized.class) +@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class) public class LocatorLauncherAssemblyIntegrationTest extends AbstractLocatorLauncherIntegrationTestCase { @Before
incubator-geode git commit: GEODE-1397: Add additional DS properties to override autogenerated ones
Repository: incubator-geode Updated Branches: refs/heads/develop 5ebd3ff28 -> 2dd3d9065 GEODE-1397: Add additional DS properties to override autogenerated ones Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/2dd3d906 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/2dd3d906 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/2dd3d906 Branch: refs/heads/develop Commit: 2dd3d9065e8cfb942c88ee24b28bffbfcc1e0357 Parents: 5ebd3ff Author: Jens DeppeAuthored: Fri May 20 07:51:00 2016 -0700 Committer: Jens Deppe Committed: Fri May 20 07:51:00 2016 -0700 -- .../internal/cli/commands/HelpCommandsIntegrationTest.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2dd3d906/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java index 2c048fc..0707766 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java @@ -57,6 +57,8 @@ public class HelpCommandsIntegrationTest { jmxPort = AvailablePortHelper.getRandomAvailableTCPPort(); Properties localProps = new Properties(); +localProps.setProperty(DistributionConfig.LOCATORS_NAME, ""); +localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true"); localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true"); localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
[2/3] incubator-geode git commit: GEODE-1397: Fixing testOfflineHelp
GEODE-1397: Fixing testOfflineHelp Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/cafda193 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/cafda193 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/cafda193 Branch: refs/heads/develop Commit: cafda19311588efd43f56736aaab26a66365f58d Parents: dd8ea42 Author: Jens DeppeAuthored: Wed May 18 14:29:43 2016 -0700 Committer: Jens Deppe Committed: Thu May 19 19:34:51 2016 -0700 -- .../commands/HelpCommandsIntegrationTest.java | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cafda193/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java index 5d43a0e..2c048fc 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java @@ -16,7 +16,9 @@ */ package com.gemstone.gemfire.management.internal.cli.commands; +import com.gemstone.gemfire.cache.CacheFactory; import com.gemstone.gemfire.distributed.internal.DistributionConfig; +import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; import com.gemstone.gemfire.internal.AvailablePortHelper; import com.gemstone.gemfire.management.internal.cli.CommandManager; import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget; @@ -27,8 +29,10 @@ import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; import org.junit.After; import org.junit.Before; +import org.junit.ClassRule; import org.junit.Ignore; import org.junit.Test; +import org.junit.contrib.java.lang.system.ProvideSystemProperty; import org.junit.experimental.categories.Category; import java.util.Map; @@ -39,12 +43,15 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @Category(IntegrationTest.class) -public class HelpCommandsIntegrationTest extends JUnit4DistributedTestCase { +public class HelpCommandsIntegrationTest { private int jmxPort; private Gfsh gfsh; + @ClassRule + public static final ProvideSystemProperty isGfsh = new ProvideSystemProperty("gfsh", "true"); + @Before public void setup() throws Exception { jmxPort = AvailablePortHelper.getRandomAvailableTCPPort(); @@ -53,19 +60,20 @@ public class HelpCommandsIntegrationTest extends JUnit4DistributedTestCase { localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true"); localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true"); localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort)); -getSystem(localProps); + +new CacheFactory(localProps).create(); gfsh = Gfsh.getInstance(false, new String[0], new GfshConfig()); } @After public void teardown() { -disconnectAllFromDS(); - -gfsh.executeCommand("disconnect"); +InternalDistributedSystem ids = InternalDistributedSystem.getConnectedInstance(); +if (ids != null) { + ids.disconnect(); +} } - @Ignore("Disconnect command doesn't appear to be working") @Test public void testOfflineHelp() throws Exception { Properties helpProps = new Properties();
[3/3] incubator-geode git commit: GEODE-1397: Rename HelpCommandsJUnitTest to ...IntegrationTest
GEODE-1397: Rename HelpCommandsJUnitTest to ...IntegrationTest Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dd8ea42a Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dd8ea42a Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dd8ea42a Branch: refs/heads/develop Commit: dd8ea42aa4fa00eda4f8812d8fdb108ceec3687a Parents: 3a1c1a9 Author: Jens DeppeAuthored: Wed May 18 14:24:39 2016 -0700 Committer: Jens Deppe Committed: Thu May 19 19:34:51 2016 -0700 -- .../commands/HelpCommandsIntegrationTest.java | 130 +++ .../cli/commands/HelpCommandsJUnitTest.java | 130 --- 2 files changed, 130 insertions(+), 130 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dd8ea42a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java new file mode 100644 index 000..5d43a0e --- /dev/null +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java @@ -0,0 +1,130 @@ +/* + * 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.management.internal.cli.commands; + +import com.gemstone.gemfire.distributed.internal.DistributionConfig; +import com.gemstone.gemfire.internal.AvailablePortHelper; +import com.gemstone.gemfire.management.internal.cli.CommandManager; +import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget; +import com.gemstone.gemfire.management.internal.cli.result.CommandResult; +import com.gemstone.gemfire.management.internal.cli.shell.Gfsh; +import com.gemstone.gemfire.management.internal.cli.shell.GfshConfig; +import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase; +import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import org.junit.After; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.util.Map; +import java.util.Properties; + +import static com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase.commandResultToString; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +@Category(IntegrationTest.class) +public class HelpCommandsIntegrationTest extends JUnit4DistributedTestCase { + + private int jmxPort; + + private Gfsh gfsh; + + @Before + public void setup() throws Exception { +jmxPort = AvailablePortHelper.getRandomAvailableTCPPort(); + +Properties localProps = new Properties(); +localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true"); +localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true"); +localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort)); +getSystem(localProps); + +gfsh = Gfsh.getInstance(false, new String[0], new GfshConfig()); + } + + @After + public void teardown() { +disconnectAllFromDS(); + +gfsh.executeCommand("disconnect"); + } + + @Ignore("Disconnect command doesn't appear to be working") + @Test + public void testOfflineHelp() throws Exception { +Properties helpProps = new Properties(); + helpProps.load(HelpCommandsIntegrationTest.class.getResourceAsStream("golden-help-offline.properties")); + +CommandManager cm = CommandManager.getInstance(); +for (Map.Entry e : cm.getCommands().entrySet()) { + // Mock commands may have been produced in the VM by other tests + // 'quit' is an alias for 'exit' and doesn't produce help + if (e.getKey().contains("mock") ||
[1/3] incubator-geode git commit: GEODE-1397: Adding new help text from create async-event-queue
Repository: incubator-geode Updated Branches: refs/heads/develop 3a1c1a964 -> 5ebd3ff28 GEODE-1397: Adding new help text from create async-event-queue Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5ebd3ff2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5ebd3ff2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5ebd3ff2 Branch: refs/heads/develop Commit: 5ebd3ff28d3ed2e3a06a8a753277f717cf384647 Parents: cafda19 Author: Jens DeppeAuthored: Wed May 18 14:30:40 2016 -0700 Committer: Jens Deppe Committed: Thu May 19 19:34:51 2016 -0700 -- .../cli/commands/golden-help-offline.properties | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5ebd3ff2/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties -- diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties index a9dc64c..74db393 100644 --- a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties +++ b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties @@ -540,9 +540,10 @@ SYNTAX\n\ \ \ \ \ create async-event-queue --id=value --listener=value [--group=value(nullvalue)*]\n\ \ \ \ \ [--parallel(=value)?] [--enable-batch-conflation(=value)?] [--batch-size=value]\n\ \ \ \ \ [--batch-time-interval=value] [--persistent(=value)?] [--disk-store=value]\n\ -\ \ \ \ [--disk-synchronous(=value)?] [--max-queue-memory=value] [--dispatcher-threads=value]\n\ -\ \ \ \ [--order-policy=value] [--gateway-event-filter=value(,value)*]\n\ -\ \ \ \ [--gateway-event-substitution-filter=value] [--listener-param=value(,value)*]\n\ +\ \ \ \ [--disk-synchronous(=value)?] [--ignore-eviction-expiration(=value)?]\n\ +\ \ \ \ [--max-queue-memory=value] [--dispatcher-threads=value] [--order-policy=value]\n\ +\ \ \ \ [--gateway-event-filter=value(,value)*] [--gateway-event-substitution-filter=value]\n\ +\ \ \ \ [--listener-param=value(,value)*]\n\ PARAMETERS\n\ \ \ \ \ id\n\ \ \ \ \ \ \ \ \ ID of the queue to be created.\n\ @@ -582,6 +583,11 @@ PARAMETERS\n\ \ \ \ \ \ \ \ \ Required: false\n\ \ \ \ \ \ \ \ \ Default (if the parameter is specified without value): true\n\ \ \ \ \ \ \ \ \ Default (if the parameter is not specified): true\n\ +\ \ \ \ ignore-eviction-expiration\n\ +\ \ \ \ \ \ \ \ Whether to ignore eviction and expiration events.\n\ +\ \ \ \ \ \ \ \ Required: false\n\ +\ \ \ \ \ \ \ \ Default (if the parameter is specified without value): true\n\ +\ \ \ \ \ \ \ \ Default (if the parameter is not specified): true\n\ \ \ \ \ max-queue-memory\n\ \ \ \ \ \ \ \ \ Maximum amount of memory, in megabytes, that the queue can consume before overflowing to\n\ \ \ \ \ \ \ \ \ disk.\n\
incubator-geode git commit: GEODE-1412: ignore-eviction-expiration flag was not used in the http controller
Repository: incubator-geode Updated Branches: refs/heads/develop f272cf005 -> 3a1c1a964 GEODE-1412: ignore-eviction-expiration flag was not used in the http controller Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3a1c1a96 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3a1c1a96 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3a1c1a96 Branch: refs/heads/develop Commit: 3a1c1a964b6c00098cdf95b2f9af596b00ec6455 Parents: f272cf0 Author: Jens DeppeAuthored: Thu May 19 10:12:51 2016 -0700 Committer: Jens Deppe Committed: Thu May 19 19:32:47 2016 -0700 -- .../internal/web/controllers/QueueCommandsController.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3a1c1a96/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/QueueCommandsController.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/QueueCommandsController.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/QueueCommandsController.java index 83d7bc1..519b5b0 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/QueueCommandsController.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/QueueCommandsController.java @@ -83,6 +83,7 @@ public class QueueCommandsController extends AbstractCommandsController { command.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__PARALLEL, String.valueOf(Boolean.TRUE.equals(parallel))); command.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__ENABLEBATCHCONFLATION, String.valueOf(Boolean.TRUE.equals(enableBatchConflation))); + command.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__IGNORE_EVICTION_EXPIRATION, String.valueOf(isIgnoreEvictionAndExpiration)); if (hasValue(batchSize)) { command.addOption(CliStrings.CREATE_ASYNC_EVENT_QUEUE__BATCH_SIZE, String.valueOf(batchSize));
[1/2] incubator-geode git commit: GEODE-1243: Updates to use new CategoryWithParameterizedRunnerFactory
Repository: incubator-geode Updated Branches: refs/heads/develop d14af16ae -> aeb8c01df GEODE-1243: Updates to use new CategoryWithParameterizedRunnerFactory Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/aeb8c01d Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/aeb8c01d Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/aeb8c01d Branch: refs/heads/develop Commit: aeb8c01df213b8f43a10c6e9bdf1529c5f723ffc Parents: 6f4a879 Author: Jens DeppeAuthored: Wed May 11 07:42:23 2016 -0700 Committer: Jens Deppe Committed: Wed May 18 14:39:17 2016 -0700 -- .../java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java | 3 ++- .../distributed/LocatorLauncherLocalFileIntegrationTest.java| 2 ++ .../distributed/LocatorLauncherLocalIntegrationTest.java| 2 ++ .../distributed/LocatorLauncherRemoteFileIntegrationTest.java | 2 ++ .../distributed/LocatorLauncherRemoteIntegrationTest.java | 2 ++ .../LocatorLauncherRemoteWithCustomLoggingIntegrationTest.java | 5 + 6 files changed, 15 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aeb8c01d/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java index 1d7afae..d25427a 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java @@ -31,8 +31,8 @@ import java.util.List; import java.util.Properties; import java.util.function.IntSupplier; -import com.gemstone.gemfire.distributed.internal.DistributionConfig; import com.gemstone.gemfire.internal.AvailablePortHelper; +import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -60,6 +60,7 @@ import org.junit.runners.Parameterized; @Category(IntegrationTest.class) @RunWith(Parameterized.class) +@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class) public class LocatorJUnitTest { private static final int REQUEST_TIMEOUT = 5 * 1000; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aeb8c01d/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalFileIntegrationTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalFileIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalFileIntegrationTest.java index 422fb7c..6451a67 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalFileIntegrationTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalFileIntegrationTest.java @@ -18,6 +18,7 @@ package com.gemstone.gemfire.distributed; import com.gemstone.gemfire.internal.process.ProcessControllerFactory; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -36,6 +37,7 @@ import static org.junit.Assert.assertFalse; */ @Category(IntegrationTest.class) @RunWith(Parameterized.class) +@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class) public class LocatorLauncherLocalFileIntegrationTest extends LocatorLauncherLocalIntegrationTest { @Before http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aeb8c01d/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java index 9137207..a8998f1 100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java @@ -23,6 +23,7 @@ import java.lang.management.ManagementFactory; import java.net.BindException; import java.net.InetAddress; +import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
[2/2] incubator-geode git commit: GEODE-1243: Locator can start on ephemeral port
GEODE-1243: Locator can start on ephemeral port Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6f4a8793 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6f4a8793 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6f4a8793 Branch: refs/heads/develop Commit: 6f4a879304b957696e220e7b806b65cfd09e4636 Parents: d14af16 Author: Jens DeppeAuthored: Wed May 4 13:06:52 2016 -0700 Committer: Jens Deppe Committed: Wed May 18 14:39:17 2016 -0700 -- .../gemstone/gemfire/distributed/Locator.java | 9 +- .../gemfire/distributed/LocatorLauncher.java| 4 + .../distributed/internal/InternalLocator.java | 49 + .../internal/tcpserver/TcpServer.java | 41 --- .../cli/commands/LauncherLifecycleCommands.java | 2 +- ...tractLocatorLauncherIntegrationTestCase.java | 21 +++- .../distributed/HostedLocatorsDUnitTest.java| 110 +++ .../gemfire/distributed/LocatorJUnitTest.java | 65 +++ ...LocatorLauncherLocalFileIntegrationTest.java | 10 +- .../LocatorLauncherLocalIntegrationTest.java| 24 +++- ...ocatorLauncherRemoteFileIntegrationTest.java | 5 +- .../LocatorLauncherRemoteIntegrationTest.java | 29 + .../InternalDistributedSystemJUnitTest.java | 30 + .../management/LocatorManagementDUnitTest.java | 63 ++- 14 files changed, 344 insertions(+), 118 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6f4a8793/geode-core/src/main/java/com/gemstone/gemfire/distributed/Locator.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/Locator.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/Locator.java index 80a0248..f089013 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/Locator.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/Locator.java @@ -73,9 +73,6 @@ public abstract class Locator { /** The file to which this locator logs */ protected File logFile; - /** The port on which this locator listens */ - protected int port; - /** The bind address for this locator */ protected InetAddress bindAddress; @@ -423,9 +420,7 @@ public abstract class Locator { /** * Returns the port on which this locator runs */ - public int getPort() { -return this.port; - } + public abstract Integer getPort(); /** * Returns the distributed system started by this locator, if any @@ -504,7 +499,7 @@ public abstract class Locator { } } StringBuilder locatorString = new StringBuilder(String.valueOf(ba)); -locatorString.append('[').append(this.port).append(']'); +locatorString.append('[').append(this.getPort()).append(']'); return locatorString.toString(); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6f4a8793/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java index 24b859c..b9edb59 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java @@ -408,6 +408,10 @@ public final class LocatorLauncher extends AbstractLauncher { * @return an Integer value indicating the port number on which the Locator is listening for client requests. */ public Integer getPort() { +if (locator != null) { + return locator.getPort(); +} + return this.port; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6f4a8793/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java -- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java index 7ad57ad..cf8d91e 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java @@ -27,13 +27,11 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Properties; import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import
incubator-geode git commit: GEODE-1293: Revert some changes which broke publishing
Repository: incubator-geode Updated Branches: refs/heads/develop fcd5491a7 -> 00c794b4c GEODE-1293: Revert some changes which broke publishing - Reinstate 'classifier' for the internal modules jar. This is still broken as the published jars are not correctly named. Will need to fix this in the near future. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/00c794b4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/00c794b4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/00c794b4 Branch: refs/heads/develop Commit: 00c794b4cbc186da419cce28c1bf62a977bf2829 Parents: fcd5491 Author: Jens DeppeAuthored: Wed May 18 08:40:52 2016 -0700 Committer: Jens Deppe Committed: Wed May 18 08:40:52 2016 -0700 -- extensions/geode-modules-session/build.gradle | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/00c794b4/extensions/geode-modules-session/build.gradle -- diff --git a/extensions/geode-modules-session/build.gradle b/extensions/geode-modules-session/build.gradle index 765bdd9..5f25d97 100644 --- a/extensions/geode-modules-session/build.gradle +++ b/extensions/geode-modules-session/build.gradle @@ -45,6 +45,7 @@ task internalJar(type: Jar) { from sourceSets.main.output include '**/internal/**/*' includeEmptyDirs = false + classifier = 'internal' baseName = 'geode-modules-session-internal' }
incubator-geode git commit: GEODE-1390: Disabling broken test
Repository: incubator-geode Updated Branches: refs/heads/develop 884cf13b0 -> 08ef0c1ee GEODE-1390: Disabling broken test Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/08ef0c1e Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/08ef0c1e Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/08ef0c1e Branch: refs/heads/develop Commit: 08ef0c1ee442d33e2da872a4a5e4bdb120d25817 Parents: 884cf13 Author: Jens DeppeAuthored: Sat May 14 15:14:12 2016 -0700 Committer: Jens Deppe Committed: Sat May 14 15:14:12 2016 -0700 -- .../cli/commands/HelpCommandsJUnitTest.java | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/08ef0c1e/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java index 7cbe85a..1d81d2e 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java @@ -25,7 +25,9 @@ import com.gemstone.gemfire.management.internal.cli.shell.Gfsh; import com.gemstone.gemfire.management.internal.cli.shell.GfshConfig; import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase; import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -41,8 +43,10 @@ public class HelpCommandsJUnitTest extends JUnit4DistributedTestCase { private int jmxPort; + private Gfsh gfsh; + @Before - public void setup() { + public void setup() throws Exception { jmxPort = AvailablePortHelper.getRandomAvailableTCPPort(); Properties localProps = new Properties(); @@ -51,15 +55,22 @@ public class HelpCommandsJUnitTest extends JUnit4DistributedTestCase { localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort)); getSystem(localProps); +gfsh = Gfsh.getInstance(false, new String[0], new GfshConfig()); } + @After + public void teardown() { +disconnectAllFromDS(); + +gfsh.executeCommand("disconnect"); + } + + @Ignore("Disconnect command doesn't appear to be working") @Test public void testOfflineHelp() throws Exception { Properties helpProps = new Properties(); helpProps.load(HelpCommandsJUnitTest.class.getResourceAsStream("golden-help-offline.properties")); -Gfsh gfsh = Gfsh.getInstance(false, new String[0], new GfshConfig()); - CommandManager cm = CommandManager.getInstance(); for (Map.Entry e : cm.getCommands().entrySet()) { // Mock commands may have been produced in the VM by other tests @@ -88,7 +99,6 @@ public class HelpCommandsJUnitTest extends JUnit4DistributedTestCase { Properties helpProps = new Properties(); helpProps.load(HelpCommandsJUnitTest.class.getResourceAsStream("golden-help-online.properties")); -Gfsh gfsh = Gfsh.getInstance(false, new String[0], new GfshConfig()); gfsh.executeCommand("connect --jmx-manager=localhost[" + jmxPort + "]"); CommandManager cm = CommandManager.getInstance();
incubator-geode git commit: GEODE-1293: Updating module scripts and structure
Repository: incubator-geode Updated Branches: refs/heads/develop d1a0748ba -> d216e5533 GEODE-1293: Updating module scripts and structure - Remove cacheserver.sh and gemfire.sh scripts in favor of using gfsh - Adjust p2p config to always use locators - Have modify_war reference correct jars Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d216e553 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d216e553 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d216e553 Branch: refs/heads/develop Commit: d216e55330e794137cee2684d05eaef683ff00f8 Parents: d1a0748 Author: Jens DeppeAuthored: Tue Mar 29 12:46:22 2016 -0700 Committer: Jens Deppe Committed: Fri May 13 11:16:16 2016 -0700 -- extensions/geode-modules-assembly/build.gradle | 53 ++-- .../release/conf/cache-client.xml | 14 +- .../release/conf/cache-server.xml | 6 +- .../release/scripts/cacheserver.bat | 133 --- .../release/scripts/cacheserver.sh | 97 -- .../release/scripts/gemfire.bat | 41 -- .../release/scripts/gemfire.sh | 58 .../release/scripts/setenv.properties | 1 + .../release/session/bin/cacheserver.bat | 56 .../release/session/bin/cacheserver.sh | 57 .../release/session/bin/gemfire.bat | 53 .../release/session/bin/gemfire.sh | 69 -- .../release/session/bin/modify_war | 91 +++-- .../release/session/bin/setenv.properties | 6 - .../gemfire-cs-tomcat-7/context-fragment.xml| 15 --- .../tcserver/gemfire-cs-tomcat-7/modules.env| 1 - .../gemfire-cs-tomcat-8/context-fragment.xml| 15 --- .../tcserver/gemfire-cs-tomcat-8/modules.env| 1 - .../gemfire-cs/configuration-prompts.properties | 17 --- .../tcserver/gemfire-cs/context-fragment.xml| 13 -- .../release/tcserver/gemfire-cs/modules.env | 1 - .../tcserver/gemfire-cs/server-fragment.xml | 12 -- .../gemfire-p2p-tomcat-7/context-fragment.xml | 15 --- .../tcserver/gemfire-p2p-tomcat-7/modules.env | 1 - .../gemfire-p2p-tomcat-8/context-fragment.xml | 15 --- .../tcserver/gemfire-p2p-tomcat-8/modules.env | 1 - .../configuration-prompts.properties| 19 --- .../tcserver/gemfire-p2p/context-fragment.xml | 13 -- .../release/tcserver/gemfire-p2p/modules.env| 1 - .../tcserver/gemfire-p2p/server-fragment.xml| 14 -- .../geode-cs-tomcat-7/context-fragment.xml | 15 +++ .../geode-cs-tomcat-8/context-fragment.xml | 15 +++ .../geode-cs/configuration-prompts.properties | 17 +++ .../tcserver/geode-cs/context-fragment.xml | 13 ++ .../tcserver/geode-cs/server-fragment.xml | 12 ++ .../geode-p2p-tomcat-7/context-fragment.xml | 15 +++ .../geode-p2p-tomcat-8/context-fragment.xml | 15 +++ .../geode-p2p/configuration-prompts.properties | 19 +++ .../tcserver/geode-p2p/context-fragment.xml | 13 ++ .../tcserver/geode-p2p/server-fragment.xml | 14 ++ extensions/geode-modules-session/build.gradle | 3 +- .../gemstone/gemfire/modules/util/Banner.java | 20 +-- geode-core/build.gradle | 2 +- gradle/dependency-versions.properties | 1 + 44 files changed, 225 insertions(+), 838 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d216e553/extensions/geode-modules-assembly/build.gradle -- diff --git a/extensions/geode-modules-assembly/build.gradle b/extensions/geode-modules-assembly/build.gradle index 960d924..8109466 100644 --- a/extensions/geode-modules-assembly/build.gradle +++ b/extensions/geode-modules-assembly/build.gradle @@ -19,15 +19,12 @@ import org.apache.tools.ant.filters.ReplaceTokens configurations { slf4jDeps - servletApiDeps moduleDistOutputs } dependencies { slf4jDeps 'org.slf4j:slf4j-api:' + project.'slf4j-api.version' slf4jDeps 'org.slf4j:slf4j-jdk14:' + project.'slf4j-api.version' - - servletApiDeps 'javax.servlet:servlet-api:2.5' } jar.enabled = false @@ -42,7 +39,7 @@ disableSigning() def getJarArtifact(module) { project(module).configurations.archives.artifacts.findAll { -it instanceof PublishArtifact && it.classifier == '' && it.type == 'jar' +it instanceof PublishArtifact && it.type == 'jar' && it.classifier == '' }.collect { it.file } } @@ -59,10 +56,6 @@ def configureTcServerAssembly = { from('release/scripts') { include '*' } -from('release/tcserver/geode-cs') { - include 'modules.env' -
[1/3] incubator-geode git commit: GEODE-1390: Move gfsh help tests from closed to open
Repository: incubator-geode Updated Branches: refs/heads/develop 7051c7ad6 -> 04a000422 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/04a00042/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-online.properties -- diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-online.properties b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-online.properties new file mode 100644 index 000..57f8f37 --- /dev/null +++ b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-online.properties @@ -0,0 +1,657 @@ +# +# 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. +# +# This file is generated with a script something like the following. The resulting output +# needs a bit of cleanup at the beginning and end. +# +# +# #!/usr/bin/env bash +# +# set -e +# +# # Preserve leading whitespace for read loops +# IFS='' +# +# $GFSH -e "help" | awk '/^[^ ]/ {print $0}' | sed -e "s/\(.*\) (.*/\1/" | \ +#while read i; do +# PARAM="$(echo $i | sed -Ee 's/[[:space:]]+/-/g').help=\\" +# echo $PARAM +# $GFSH -e "connect --jmx-manager=localhost[1099]" -e "help connect" | head -13 | tail -4 | \ +#while read j; do +# if [ -n "$j" ]; then +#echo "$j\\" | sed -E -e ':a' -e 's/^([[:space:]]*)[[:space:]]/\1\\ /;ta' +# fi +#done +#echo "" +#done + +alter-disk-store.help=\ +NAME\n\ +\ \ \ \ alter disk-store\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +alter-region.help=\ +NAME\n\ +\ \ \ \ alter region\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +alter-runtime.help=\ +NAME\n\ +\ \ \ \ alter runtime\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +backup-disk-store.help=\ +NAME\n\ +\ \ \ \ backup disk-store\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +change-loglevel.help=\ +NAME\n\ +\ \ \ \ change loglevel\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +clear-defined-indexes.help=\ +NAME\n\ +\ \ \ \ clear defined indexes\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +close-durable-client.help=\ +NAME\n\ +\ \ \ \ close durable-client\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +close-durable-cq.help=\ +NAME\n\ +\ \ \ \ close durable-cq\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +compact-disk-store.help=\ +NAME\n\ +\ \ \ \ compact disk-store\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +compact-offline-disk-store.help=\ +NAME\n\ +\ \ \ \ compact offline-disk-store\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +configure-pdx.help=\ +NAME\n\ +\ \ \ \ configure pdx\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +connect.help=\ +NAME\n\ +\ \ \ \ connect\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +create-async-event-queue.help=\ +NAME\n\ +\ \ \ \ create async-event-queue\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +create-defined-indexes.help=\ +NAME\n\ +\ \ \ \ create defined indexes\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +create-disk-store.help=\ +NAME\n\ +\ \ \ \ create disk-store\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +create-gateway-receiver.help=\ +NAME\n\ +\ \ \ \ create gateway-receiver\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +create-gateway-sender.help=\ +NAME\n\ +\ \ \ \ create gateway-sender\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +create-index.help=\ +NAME\n\ +\ \ \ \ create index\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +create-region.help=\ +NAME\n\ +\ \ \ \ create region\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +debug.help=\ +NAME\n\ +\ \ \ \ debug\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +define-index.help=\ +NAME\n\ +\ \ \ \ define index\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +deploy.help=\ +NAME\n\ +\ \ \ \ deploy\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +describe-client.help=\ +NAME\n\ +\ \ \ \ describe client\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +describe-config.help=\ +NAME\n\ +\ \ \ \ describe config\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +describe-connection.help=\ +NAME\n\ +\ \ \ \ describe connection\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +describe-disk-store.help=\ +NAME\n\ +\ \ \ \ describe disk-store\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ + +describe-member.help=\ +NAME\n\ +\ \ \ \ describe member\n\ +IS AVAILABLE\n\
[2/3] incubator-geode git commit: GEODE-1390: Move gfsh help tests from closed to open
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/04a00042/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties -- diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties new file mode 100644 index 000..a9dc64c --- /dev/null +++ b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties @@ -0,0 +1,2997 @@ +# +# 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. +# +# +# This file is generated with a script something like the following. The resulting output +# needs a bit of cleanup at the beginning and end. +# +# #!/usr/bin/env bash +# +# set -e +# +# # Preserve leading whitespace for read loops +# IFS='' +# +# $GFSH -e "help" | awk '/^[^ ]/ {print $0}' | sed -e "s/\(.*\) (.*/\1/" | \ +#while read i; do +# PARAM="$(echo $i | sed -Ee 's/[[:space:]]+/-/g').help=\\" +# echo $PARAM +# $GFSH help $i | \ +#while read j; do +# if [ -n "$j" ]; then +#echo "$j\\" | sed -E -e ':a' -e 's/^([[:space:]]*)[[:space:]]/\1\\ /;ta' +# fi +#done +#echo "" +#done + +alter-disk-store.help=\ +NAME\n\ +\ \ \ \ alter disk-store\n\ +IS AVAILABLE\n\ +\ \ \ \ true\n\ +SYNOPSIS\n\ +\ \ \ \ Alter some options for a region or remove a region in an offline disk store.\n\ +SYNTAX\n\ +\ \ \ \ alter disk-store --name=value --region=value --disk-dirs=value(,value)* [--compressor(=value)?]\n\ +\ \ \ \ [--concurrency-level=value] [--enable-statistics=value] [--initial-capacity=value]\n\ +\ \ \ \ [--load-factor=value] [--lru-action=value] [--lru-algorthm=value] [--lru-limit=value]\n\ +\ \ \ \ [--off-heap=value] [--remove(=value)?]\n\ +PARAMETERS\n\ +\ \ \ \ name\n\ +\ \ \ \ \ \ \ \ Name of the disk store whose contents will be altered.\n\ +\ \ \ \ \ \ \ \ Required: true\n\ +\ \ \ \ region\n\ +\ \ \ \ \ \ \ \ Name/Path of the region in the disk store to alter.\n\ +\ \ \ \ \ \ \ \ Required: true\n\ +\ \ \ \ disk-dirs\n\ +\ \ \ \ \ \ \ \ Directories where data for the disk store was previously written.\n\ +\ \ \ \ \ \ \ \ Required: true\n\ +\ \ \ \ compressor\n\ +\ \ \ \ \ \ \ \ The fully-qualifed class name of the Compressor to use when compressing region entry\n\ +\ \ \ \ \ \ \ \ values. A value of 'none' will remove the Compressor.\n\ +\ \ \ \ \ \ \ \ Required: false\n\ +\ \ \ \ \ \ \ \ Default (if the parameter is specified without value): none\n\ +\ \ \ \ concurrency-level\n\ +\ \ \ \ \ \ \ \ An estimate of the maximum number of application threads that will concurrently modify a\n\ +\ \ \ \ \ \ \ \ region at one time. This attribute does not apply to partitioned regions.\n\ +\ \ \ \ \ \ \ \ Required: false\n\ +\ \ \ \ enable-statistics\n\ +\ \ \ \ \ \ \ \ Whether to enable statistics. Valid values are: true and false.\n\ +\ \ \ \ \ \ \ \ Required: false\n\ +\ \ \ \ initial-capacity\n\ +\ \ \ \ \ \ \ \ Together with --load-factor, sets the parameters on the underlying\n\ +\ \ \ \ \ \ \ \ java.util.ConcurrentHashMap used for storing region entries.\n\ +\ \ \ \ \ \ \ \ Required: false\n\ +\ \ \ \ load-factor\n\ +\ \ \ \ \ \ \ \ Together with --initial-capacity, sets the parameters on the underlying\n\ +\ \ \ \ \ \ \ \ java.util.ConcurrentHashMap used for storing region entries. This must be a floating point\n\ +\ \ \ \ \ \ \ \ number between 0 and 1, inclusive.\n\ +\ \ \ \ \ \ \ \ Required: false\n\ +\ \ \ \ lru-action\n\ +\ \ \ \ \ \ \ \ Action to take when evicting entries from the region. Valid values are: none,\n\ +\ \ \ \ \ \ \ \ overflow-to-disk and local-destroy.\n\ +\ \ \ \ \ \ \ \ Required: false\n\ +\ \ \ \ lru-algorthm\n\ +\ \ \ \ \ \ \ \ Least recently used eviction algorithm. Valid values are: none, lru-entry-count,\n\ +\ \ \ \ \ \ \ \ lru-heap-percentage and lru-memory-size.\n\ +\ \ \ \ \ \ \ \ Required: false\n\ +\ \ \ \ lru-limit\n\ +\ \ \ \ \ \ \ \ Number of entries allowed in the region before eviction will
[3/3] incubator-geode git commit: GEODE-1390: Move gfsh help tests from closed to open
GEODE-1390: Move gfsh help tests from closed to open Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/04a00042 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/04a00042 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/04a00042 Branch: refs/heads/develop Commit: 04a000422103887da13d7fd6422995a5bbe06a51 Parents: 7051c7a Author: Jens DeppeAuthored: Thu May 12 13:53:49 2016 -0700 Committer: Jens Deppe Committed: Fri May 13 10:24:38 2016 -0700 -- .../cli/commands/CliCommandTestBase.java|4 +- .../cli/commands/HelpCommandsJUnitTest.java | 120 + .../cli/commands/golden-help-offline.properties | 2997 ++ .../cli/commands/golden-help-online.properties | 657 4 files changed, 3775 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/04a00042/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java index 0486c5a..4b25165 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java @@ -43,8 +43,6 @@ import com.gemstone.gemfire.management.internal.security.JSONAuthorization; import com.gemstone.gemfire.test.dunit.Host; import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase; -import org.junit.runners.Parameterized; - import org.junit.Rule; import org.junit.rules.TemporaryFolder; @@ -396,7 +394,7 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase { printStream.print(commandResultToString(commandResult)); } - protected String commandResultToString(final CommandResult commandResult) { + protected static String commandResultToString(final CommandResult commandResult) { assertNotNull(commandResult); commandResult.resetToFirstLine(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/04a00042/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java -- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java new file mode 100644 index 000..7cbe85a --- /dev/null +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java @@ -0,0 +1,120 @@ +/* + * 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.management.internal.cli.commands; + +import com.gemstone.gemfire.distributed.internal.DistributionConfig; +import com.gemstone.gemfire.internal.AvailablePortHelper; +import com.gemstone.gemfire.management.internal.cli.CommandManager; +import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget; +import com.gemstone.gemfire.management.internal.cli.result.CommandResult; +import com.gemstone.gemfire.management.internal.cli.shell.Gfsh; +import com.gemstone.gemfire.management.internal.cli.shell.GfshConfig; +import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase; +import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.util.Map; +import java.util.Properties; + +import static com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase.commandResultToString; +import static
incubator-geode git commit: GEODE-1350: Add test category
Repository: incubator-geode Updated Branches: refs/heads/develop 973c86c7a -> f59497776 GEODE-1350: Add test category Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f5949777 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f5949777 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f5949777 Branch: refs/heads/develop Commit: f59497776ccc8186fe62626198cd38605fae405a Parents: 973c86c Author: Jens DeppeAuthored: Fri May 13 09:03:15 2016 -0700 Committer: Jens Deppe Committed: Fri May 13 09:03:15 2016 -0700 -- .../junit/runners/CategoryWithParameterizedRunnerFactoryTest.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f5949777/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactoryTest.java -- diff --git a/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactoryTest.java b/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactoryTest.java index 63a579b..40fda16 100644 --- a/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactoryTest.java +++ b/geode-junit/src/test/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactoryTest.java @@ -41,6 +41,7 @@ import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +@Category(UnitTest.class) public class CategoryWithParameterizedRunnerFactoryTest { /**
incubator-geode git commit: GEODE-1350: Provide local fix for Category and Parameterized test issue
Repository: incubator-geode Updated Branches: refs/heads/develop 819bf650b -> 973c86c7a GEODE-1350: Provide local fix for Category and Parameterized test issue Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/973c86c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/973c86c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/973c86c7 Branch: refs/heads/develop Commit: 973c86c7a2706f1737c39ffc4fa2feaf0fc08801 Parents: 819bf65 Author: Jens DeppeAuthored: Wed May 11 08:05:33 2016 -0700 Committer: Jens Deppe Committed: Fri May 13 07:54:30 2016 -0700 -- .../CategoryWithParameterizedRunner.java| 44 + .../CategoryWithParameterizedRunnerFactory.java | 42 + .../junit/runners/ExposedGetAnnotations.java| 23 +++ ...egoryWithParameterizedRunnerFactoryTest.java | 161 +++ 4 files changed, 270 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/973c86c7/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunner.java -- diff --git a/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunner.java b/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunner.java new file mode 100644 index 000..c96951b --- /dev/null +++ b/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunner.java @@ -0,0 +1,44 @@ +/* + * 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.test.junit.runners; + +import org.junit.runner.RunWith; +import org.junit.runners.model.InitializationError; +import org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParameters; +import org.junit.runners.parameterized.TestWithParameters; + +import java.lang.annotation.Annotation; +import java.util.ArrayList; +import java.util.List; + +public class CategoryWithParameterizedRunner extends BlockJUnit4ClassRunnerWithParameters implements ExposedGetAnnotations { + public CategoryWithParameterizedRunner(TestWithParameters test) throws InitializationError { +super(test); + } + + @Override + public Annotation[] getRunnerAnnotations() { +Annotation[] allAnnotations = getTestClass().getAnnotations(); +List annotationsWithoutRunWith = new ArrayList<>(); +for (Annotation annotation: allAnnotations) { + if (!annotation.annotationType().equals(RunWith.class)) { +annotationsWithoutRunWith.add(annotation); + } +} +return annotationsWithoutRunWith.toArray(new Annotation[0]); + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/973c86c7/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactory.java -- diff --git a/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactory.java b/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactory.java new file mode 100644 index 000..84882f0 --- /dev/null +++ b/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/runners/CategoryWithParameterizedRunnerFactory.java @@ -0,0 +1,42 @@ +/* + * 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