[geode] branch feature/GEODE-5307 deleted (was ad121d6)
This is an automated email from the ASF dual-hosted git repository. nnag pushed a change to branch feature/GEODE-5307 in repository https://gitbox.apache.org/repos/asf/geode.git. was ad121d6 GEODE-5278 Unexpected CommitConflictException caused by faulty region synchronization This change permanently discards the following revisions: discard ad121d6 GEODE-5278 Unexpected CommitConflictException caused by faulty region synchronization discard 7b4e1ca Revert "GEM-2188 client fails with ToDataException (ServerLocation) when failing over to surviving side after a network partition" discard 94ce992 GEM-2188 client fails with ToDataException (ServerLocation) when failing over to surviving side after a network partition discard 56547cc GEODE-92: fix deadlock introduced by previous commit discard 6757310 Revert "GEODE-92: fix deadlock introduced by previous commit" discard 69822bd GEODE-92: fix deadlock introduced by previous commit discard 7f9cfdb GEODE-5612: Add Category to RVVExceptionJUnitTest discard 1332571 Update jackson and spring dependencies discard 959d722 GEODE-5612: Fix RVVExceptionB.writeReceived() (#2354) discard 72b88c5 GEODE-5559: Improve runtime of RegionVersionHolder.canonicalExceptions (#2298) discard b72a86c Revert "GEODE-4928 DistributedLockService doesn't work as expected while the dlock grantor is initialized" discard 0834960 GEODE-4823: OQL index not updated for tombstone (#1603) discard 2a4ab93 GEODE-4867: Added query time expiration checks. (#1624) discard bd17de9 Update failing intergrationTest to not rely on 1.1.1.1 to match develop discard 55b63f5 GEODE-5631: failedBatchRemovalMessageKeys not used after GII (#2375) discard 7a354a0a GEODE-4787: Re-instate Management REST API endpoints for 'create index' and 'create region'. (#1563) discard fa72799 Merge pull request #26 from gemfire/support/GEODE-4076 discard 84b1c7c GEODE-4076: throw AuthenticationRequiredException when failed to find… (#1369) discard a8d024b GEODE-4639: Removing Java PathFinder concurrency test runner discard 81925ff GEM-2341: Fixes formatting discard 8065884 GEM-2341: Cherry-picked 947c4db09d6463d810d5c6799ec0b22451ea6e1f GEODE-6215: Making session meta-data region distributed (#3012) discard c7dd3a6 Revert "GEM-2054: add set-cluster-configuration and get-cluster-configuration command (#12)" discard f3dc6a6 GEM-2054: add set-cluster-configuration and get-cluster-configuration command (#12) discard 0fec2fe GEODE-4928 DistributedLockService doesn't work as expected while the dlock grantor is initialized discard f2559f0 GEODE-4765: Add retries when retrieving cluster config (#1539) discard 7bb2a6b GEODE-4180: get rid of withTempWorkingDir in ClusterStartupRule discard ff5b481 GEODE-4704: Modified ConflationKey to use shadowKey when comparing events discard ca28675 GEODE-4615 Deadlock shutting down client cache discard 6b455f1 GEODE-4573 set JTAPaused flag even if JTA is not yet bootstrapped when pauseTransaction is executed. (#1403) discard c9c8dff GEODE-4651/GEM-1889: fix transactional destroy entry leak discard c0b168a GEODE-4184: Handled concurrent access of HashSet discard 4797ce1 Removing TypeUtils classes from excludedClasses due to incorrect merge discard 04e81b2 GEODE-4615 Deadlock shutting down client cache discard a28ea31 GEM-1894: Argumentredactor is not properly applied to System Properties (#5) discard de79ec8 GEODE-4229 CI failure due to suspect string: "Locator socket was closed unexpectedly" discard 826b3fd GEODE-4417: Remove support for DES. (#1355) discard e3acadd GEODE-4306: Added concurrent checks enabled test to event time discard e17cc4a GEODE-4270: remove race condition where CacheClientProxy could be asked to (#1378) discard 47d3d26 GEODE-4379: Move RemoteOutputStreamServer from gfsh to the manager (#1341) discard d4d6770 GEODE-4370: Ensure that rmi-io uses the JMX/RMI port (#1339) discard be35df1 GEODE-4298: Restore public access to StartServer method. discard 0749115 GEODE-4293: Pulse works correctly when jmx-manager-password-file is set (#1279) discard 230be87 Squashed commit of the following: discard ff88f90 Merge pull request #1239 from dschneider-pivotal/feature/GEODE-4051 discard 427424d GEODE-4192 GetServer request should return error if no servers found discard b6b45be GEODE-4160: fix gfsh describe jdbc-connection (#1223) discard 48beac6 GEODE-4131: add the deprecated API in MemberMXBean (#1231)
[geode] branch feature/GEODE-6291 updated (0181f4d -> a0500d9)
This is an automated email from the ASF dual-hosted git repository. dschneider pushed a change to branch feature/GEODE-6291 in repository https://gitbox.apache.org/repos/asf/geode.git. from 0181f4d implemented computeFieldType WIP: still need testing of precondition function WIP: still need describe to show the field mappings new 0335a8c added CreateMappingPreconditionCheckFunction new d5326c9 moved DescribeMappingCommandTest to the proper package new a0500d9 fixed some problems with the new function and xml The 7265 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../CreateMappingPreconditionCheckFunction.java| 49 +--- .../jdbc/internal/configuration/RegionMapping.java | 2 +- .../sanctioned-geode-connectors-serializables.txt | 1 + .../internal/cli/CreateMappingFunctionTest.java| 6 +- ...CreateMappingPreconditionCheckFunctionTest.java | 316 + .../cli}/DescribeMappingCommandTest.java | 3 +- 6 files changed, 337 insertions(+), 40 deletions(-) create mode 100644 geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingPreconditionCheckFunctionTest.java rename geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/{org/apache/geode/connectors/util => internal/cli}/DescribeMappingCommandTest.java (97%)
[geode] branch feature/GEODE-6273 updated: Add multiple server group to mapping command
This is an automated email from the ASF dual-hosted git repository. jchen21 pushed a commit to branch feature/GEODE-6273 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-6273 by this push: new 6435e2f Add multiple server group to mapping command 6435e2f is described below commit 6435e2f8deef9695131aa3d3e53f81fe7e82e25a Author: Jianxia Chen AuthorDate: Wed Jan 23 16:57:01 2019 -0800 Add multiple server group to mapping command Co-authored-by: Ben Ross Co-authored-by: Jianxia Chen --- .../cli/CreateMappingCommandDUnitTest.java | 117 - 1 file changed, 69 insertions(+), 48 deletions(-) diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java index 5552e82..9d77034 100644 --- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java +++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java @@ -62,6 +62,7 @@ public class CreateMappingCommandDUnitTest { private static final String TEST_REGION = "testRegion"; private static final String GROUP1_REGION = "group1Region"; private static final String GROUP2_REGION = "group2Region"; + private static final String GROUP1_GROUP2_REGION = "group1Group2Region"; private static final String TEST_GROUP1 = "testGroup1"; private static final String TEST_GROUP2 = "testGroup2"; @@ -238,26 +239,12 @@ public class CreateMappingCommandDUnitTest { // TEST_GROUP1 only contains server2 and server 4 server2.invoke(() -> { RegionMapping mapping = getRegionMappingFromService(regionName); - assertThat(mapping.getDataSourceName()).isEqualTo("connection"); - assertThat(mapping.getTableName()).isEqualTo("myTable"); - assertThat(mapping.getPdxName()).isEqualTo("myPdxClass"); - assertThat(mapping.getIds()).isEqualTo("myId"); - assertThat(mapping.getCatalog()).isEqualTo("myCatalog"); - assertThat(mapping.getSchema()).isEqualTo("mySchema"); - validateRegionAlteredOnServer(regionName, false); - validateAsyncEventQueueCreatedOnServer(regionName, false); + assertValidMapping(mapping, regionName, false, false); }); server4.invoke(() -> { RegionMapping mapping = getRegionMappingFromService(regionName); - assertThat(mapping.getDataSourceName()).isEqualTo("connection"); - assertThat(mapping.getTableName()).isEqualTo("myTable"); - assertThat(mapping.getPdxName()).isEqualTo("myPdxClass"); - assertThat(mapping.getIds()).isEqualTo("myId"); - assertThat(mapping.getCatalog()).isEqualTo("myCatalog"); - assertThat(mapping.getSchema()).isEqualTo("mySchema"); - validateRegionAlteredOnServer(regionName, false); - validateAsyncEventQueueCreatedOnServer(regionName, false); + assertValidMapping(mapping, regionName, false,false); }); server1.invoke(() -> { @@ -303,26 +290,12 @@ public class CreateMappingCommandDUnitTest { // TEST_GROUP2 only contains server3 and server4 server3.invoke(() -> { RegionMapping mapping = getRegionMappingFromService(regionName); - assertThat(mapping.getDataSourceName()).isEqualTo("connection"); - assertThat(mapping.getTableName()).isEqualTo("myTable"); - assertThat(mapping.getPdxName()).isEqualTo("myPdxClass"); - assertThat(mapping.getIds()).isEqualTo("myId"); - assertThat(mapping.getCatalog()).isEqualTo("myCatalog"); - assertThat(mapping.getSchema()).isEqualTo("mySchema"); - validateRegionAlteredOnServer(regionName, false); - validateAsyncEventQueueCreatedOnServer(regionName, true); + assertValidMapping(mapping, regionName, false, true); }); server4.invoke(() -> { RegionMapping mapping = getRegionMappingFromService(regionName); - assertThat(mapping.getDataSourceName()).isEqualTo("connection"); - assertThat(mapping.getTableName()).isEqualTo("myTable"); - assertThat(mapping.getPdxName()).isEqualTo("myPdxClass"); - assertThat(mapping.getIds()).isEqualTo("myId"); - assertThat(mapping.getCatalog()).isEqualTo("myCatalog"); - assertThat(mapping.getSchema()).isEqualTo("mySchema"); - validateRegionAlteredOnServer(regionName, false); - validateAsyncEventQueueCreatedOnServer(regionName, true); + assertValidMapping(mapping, regionName, false, true); }); server1.invoke(() -> { @@ -349,6 +322,68 @@ public class CreateMappingCommandDUnitTest { } @Test + @Parameters({GROUP1_GROUP2_REGION, "/" + GROUP1_GROUP2_REGION}) + public void createMappingReplicatedUpdatesServiceAndClusterConfigForMultiServerGroup( + String regionName)
[geode] branch feature/GEODE-6273 updated: Remove groups from RegionMapping and xsd
This is an automated email from the ASF dual-hosted git repository. jchen21 pushed a commit to branch feature/GEODE-6273 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-6273 by this push: new a9a59e1 Remove groups from RegionMapping and xsd a9a59e1 is described below commit a9a59e1a171d14602e5031320b81528c68ce10a3 Author: Ben Ross AuthorDate: Wed Jan 23 15:15:06 2019 -0800 Remove groups from RegionMapping and xsd Co-authored-by: Ben Ross Co-authored-by: Jianxia Chen --- .../jdbc/internal/TestConfigService.java | 2 +- .../cli/DescribeMappingCommandDUnitTest.java | 2 +- .../internal/cli/ListMappingCommandDUnitTest.java | 2 +- .../jdbc/internal/cli/CreateMappingCommand.java| 3 +- .../jdbc/internal/cli/DescribeMappingFunction.java | 5 +- .../jdbc/internal/configuration/RegionMapping.java | 18 + .../connectors/jdbc/internal/xml/ElementType.java | 1 - .../xml/JdbcConnectorServiceXmlParser.java | 1 - .../geode.apache.org/schema/jdbc/jdbc-1.0.xsd | 1 - .../jdbc/internal/RegionMappingTest.java | 89 +++--- .../internal/cli/CreateMappingFunctionTest.java| 2 +- .../internal/cli/DescribeMappingFunctionTest.java | 3 - .../jdbc/internal/cli/ListMappingCommandTest.java | 4 +- .../jdbc/internal/xml/ElementTypeTest.java | 2 - 14 files changed, 53 insertions(+), 82 deletions(-) diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java index ebf7593..3caa83f 100644 --- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java +++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/internal/TestConfigService.java @@ -53,6 +53,6 @@ public class TestConfigService { private static RegionMapping createRegionMapping(String pdxClassName, String ids, String catalog, String schema) { return new RegionMapping(REGION_NAME, pdxClassName, REGION_TABLE_NAME, -CONNECTION_CONFIG_NAME, ids, catalog, schema, null); +CONNECTION_CONFIG_NAME, ids, catalog, schema); } } diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandDUnitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandDUnitTest.java index 38fdbe9..8a2023e 100644 --- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandDUnitTest.java +++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/DescribeMappingCommandDUnitTest.java @@ -205,7 +205,7 @@ public class DescribeMappingCommandDUnitTest implements Serializable { InternalCache cache = ClusterStartupRule.getCache(); JdbcConnectorService service = cache.getService(JdbcConnectorService.class); service.createRegionMapping(new RegionMapping(TEST_REGION, "myPdxClass", -"testTable", "connection", "myId", "myCatalog", "mySchema", null)); +"testTable", "connection", "myId", "myCatalog", "mySchema")); assertThat(service.getMappingForRegion(TEST_REGION)).isNotNull(); } } diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandDUnitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandDUnitTest.java index 3a9c715..bc4ce9e 100644 --- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandDUnitTest.java +++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/ListMappingCommandDUnitTest.java @@ -116,7 +116,7 @@ public class ListMappingCommandDUnitTest implements Serializable { for (int i = 1; i <= N; i++) { String name = regionName + "-" + i; service.createRegionMapping( - new RegionMapping(name, "x.y.MyPdxClass", "table", "connection", null, null, null, null)); + new RegionMapping(name, "x.y.MyPdxClass", "table", "connection", null, null, null)); assertThat(service.getMappingForRegion(name)).isNotNull(); } } diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommand.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommand.java index 7ed9490..5511317 100644 --- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommand.java +++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommand.java @@ -115,8 +115,7 @@ public class
[geode] branch feature/GEODE-6273 updated: Spotless apply
This is an automated email from the ASF dual-hosted git repository. jchen21 pushed a commit to branch feature/GEODE-6273 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-6273 by this push: new 1a610f2 Spotless apply 1a610f2 is described below commit 1a610f210918c763cc630a860d319ca4f221f046 Author: Jianxia Chen AuthorDate: Wed Jan 23 14:24:42 2019 -0800 Spotless apply Co-authored-by: Ben Ross Co-authored-by: Jianxia Chen --- .../jdbc/internal/cli/CreateMappingCommandDUnitTest.java | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java index 25f25c2..5552e82 100644 --- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java +++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java @@ -126,8 +126,9 @@ public class CreateMappingCommandDUnitTest { } private void setupGroupPartition(String regionName, String groupNames) { -gfsh.executeAndAssertThat("create region --name=" + regionName + " --type=PARTITION --groups=" + groupNames) -.statusIsSuccess(); +gfsh.executeAndAssertThat( +"create region --name=" + regionName + " --type=PARTITION --groups=" + groupNames) +.statusIsSuccess(); } private void setupAsyncEventQueue(String regionName) { @@ -219,7 +220,8 @@ public class CreateMappingCommandDUnitTest { @Test @Parameters({GROUP1_REGION, "/" + GROUP1_REGION}) - public void createMappingReplicatedUpdatesServiceAndClusterConfigForServerGroup(String regionName) { + public void createMappingReplicatedUpdatesServiceAndClusterConfigForServerGroup( + String regionName) { setupGroupReplicate(regionName, TEST_GROUP1); CommandStringBuilder csb = new CommandStringBuilder(CREATE_MAPPING); csb.addOption(REGION_NAME, regionName); @@ -283,7 +285,8 @@ public class CreateMappingCommandDUnitTest { @Test @Parameters({GROUP2_REGION, "/" + GROUP2_REGION}) - public void createMappingParitionedUpdatesServiceAndClusterConfigForServerGroup(String regionName) { + public void createMappingParitionedUpdatesServiceAndClusterConfigForServerGroup( + String regionName) { setupGroupPartition(regionName, TEST_GROUP2); CommandStringBuilder csb = new CommandStringBuilder(CREATE_MAPPING); csb.addOption(REGION_NAME, regionName);
[geode] branch feature/GEODE-6315 updated: GEODE-6315: Handle null in comparison in a compressed offheap region
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch feature/GEODE-6315 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-6315 by this push: new 5bf8302 GEODE-6315: Handle null in comparison in a compressed offheap region 5bf8302 is described below commit 5bf83024cff9f6d8f68d435d23f1d1a9e6218549 Author: eshu AuthorDate: Wed Jan 23 14:06:00 2019 -0800 GEODE-6315: Handle null in comparison in a compressed offheap region --- .../geode/internal/cache/ValueComparisonHelper.java | 6 +++--- .../geode/internal/cache/ValueComparisonHelperTest.java | 16 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ValueComparisonHelper.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ValueComparisonHelper.java index 285e8e5..2315701 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/ValueComparisonHelper.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ValueComparisonHelper.java @@ -227,6 +227,9 @@ public class ValueComparisonHelper { } Object cdVal = cd.getValue(); if (cdVal instanceof byte[]) { + if (obj == null || obj == Token.NOT_AVAILABLE || Token.isInvalidOrRemoved(obj)) { +return false; + } byte[] cdValBytes = (byte[]) cdVal; PdxInstance pi = InternalDataSerializer.readPdxInstance(cdValBytes, cache); if (pi != null) { @@ -250,9 +253,6 @@ public class ValueComparisonHelper { if (obj instanceof CachedDeserializable) { deserializedObj = ((CachedDeserializable) obj).getDeserializedForReading(); } else { - if (obj == null || obj == Token.NOT_AVAILABLE || Token.isInvalidOrRemoved(obj)) { -return false; - } // TODO OPTIMIZE: Before serializing all of obj we could get the top // level class name of cdVal and compare it to the top level class name of obj. deserializedObj = obj; diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ValueComparisonHelperTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ValueComparisonHelperTest.java index 830ff7f..b39ea8d 100644 --- a/geode-core/src/test/java/org/apache/geode/internal/cache/ValueComparisonHelperTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ValueComparisonHelperTest.java @@ -509,6 +509,10 @@ public class ValueComparisonHelperTest { ValueComparisonHelper.checkEquals(cachedDeserializable, null, false, mock(InternalCache.class))) .isFalse(); +assertThat( +ValueComparisonHelper.checkEquals(cachedDeserializable, null, true, +mock(InternalCache.class))) +.isFalse(); } @Test @@ -521,6 +525,10 @@ public class ValueComparisonHelperTest { ValueComparisonHelper.checkEquals(cachedDeserializable, Token.NOT_AVAILABLE, false, mock(InternalCache.class))) .isFalse(); +assertThat( +ValueComparisonHelper.checkEquals(cachedDeserializable, Token.NOT_AVAILABLE, true, +mock(InternalCache.class))) +.isFalse(); } @Test @@ -537,6 +545,14 @@ public class ValueComparisonHelperTest { ValueComparisonHelper.checkEquals(cachedDeserializable, Token.LOCAL_INVALID, false, mock(InternalCache.class))) .isFalse(); +assertThat( +ValueComparisonHelper.checkEquals(cachedDeserializable, Token.INVALID, true, +mock(InternalCache.class))) +.isFalse(); +assertThat( +ValueComparisonHelper.checkEquals(cachedDeserializable, Token.LOCAL_INVALID, true, +mock(InternalCache.class))) +.isFalse(); } @Test
[geode] branch feature/GEODE-6315 created (now bd45232)
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a change to branch feature/GEODE-6315 in repository https://gitbox.apache.org/repos/asf/geode.git. at bd45232 GEODE-6268: Reduce the number of iterations for unique port ranges in AvailablePortHelperIntegrationTest (#3092) No new revisions were added by this update.
[geode-benchmarks] branch develop updated: GEODE-6311: Adding the OQL benchmarks (#49)
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git The following commit(s) were added to refs/heads/develop by this push: new feab250 GEODE-6311: Adding the OQL benchmarks (#49) feab250 is described below commit feab2509f4f6b3fecdc71538b8dfe75771427145 Author: Nabarun Nag AuthorDate: Wed Jan 23 13:46:54 2019 -0800 GEODE-6311: Adding the OQL benchmarks (#49) --- .../geode/benchmark/tasks/CreateIndexOnID.java | 34 + .../org/apache/geode/benchmark/tasks/OQLQuery.java | 86 ++ .../tests/PartitionedIndexedQueryBenchmark.java| 62 .../tests/PartitionedNonIndexedQueryBenchmark.java | 60 +++ .../tests/ReplicatedIndexedQueryBenchmark.java | 62 .../tests/ReplicatedNonIndexedQueryBenchmark.java | 60 +++ .../PartitionedIndexedQueryBenchmarkTest.java | 44 +++ .../PartitionedNonIndexedQueryBenchmarkTest.java | 44 +++ .../tests/ReplicatedIndexedQueryBenchmarkTest.java | 44 +++ .../ReplicatedNonIndexedQueryBenchmarkTest.java| 44 +++ 10 files changed, 540 insertions(+) diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/CreateIndexOnID.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/CreateIndexOnID.java new file mode 100644 index 000..0201898 --- /dev/null +++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/CreateIndexOnID.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 org.apache.geode.benchmark.tasks; + + +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.query.IndexNameConflictException; +import org.apache.geode.perftest.Task; +import org.apache.geode.perftest.TestContext; + +public class CreateIndexOnID implements Task { + + @Override + public void run(TestContext context) throws Exception { +Cache serverCache = (Cache) context.getAttribute("SERVER_CACHE"); +try { + serverCache.getQueryService().createIndex("IDIndex", "r.ID", "/region r"); +} catch (IndexNameConflictException ex) { + +} + } +} diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/OQLQuery.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/OQLQuery.java new file mode 100644 index 000..3dc72e7 --- /dev/null +++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/OQLQuery.java @@ -0,0 +1,86 @@ +/* + * 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.benchmark.tasks; + +import java.io.Serializable; +import java.util.Map; +import java.util.concurrent.ThreadLocalRandom; + +import benchmark.geode.data.Portfolio; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.yardstickframework.BenchmarkConfiguration; +import org.yardstickframework.BenchmarkDriverAdapter; + +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.query.FunctionDomainException; +import org.apache.geode.cache.query.NameResolutionException; +import org.apache.geode.cache.query.QueryInvocationTargetException; +import org.apache.geode.cache.query.QueryService; +import org.apache.geode.cache.query.SelectResults; +import
[geode] branch feature/GEODE-6273 updated: Added Partitioned group test to CreateMappingDUnitTest
This is an automated email from the ASF dual-hosted git repository. jchen21 pushed a commit to branch feature/GEODE-6273 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-6273 by this push: new 742a9e5 Added Partitioned group test to CreateMappingDUnitTest 742a9e5 is described below commit 742a9e5afafe7d80056711f3ec689b0cf8f9c205 Author: Ben Ross AuthorDate: Wed Jan 23 12:15:43 2019 -0800 Added Partitioned group test to CreateMappingDUnitTest - Added additional servers to CreateMappingDUnitTest - Removed unnessessary code from CliUtil, GfshCommand, and CommandExecutor Co-authored-by: Ben Ross Co-authored-by: Jianxia Chen --- .../cli/CreateMappingCommandDUnitTest.java | 118 + .../jdbc/internal/cli/CreateMappingCommand.java| 4 +- .../apache/geode/management/cli/GfshCommand.java | 4 - .../geode/management/internal/cli/CliUtil.java | 36 --- .../internal/cli/remote/CommandExecutor.java | 7 +- 5 files changed, 123 insertions(+), 46 deletions(-) diff --git a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java index 1cee130..25f25c2 100644 --- a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java +++ b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java @@ -60,8 +60,10 @@ import org.apache.geode.test.junit.rules.serializable.SerializableTestName; public class CreateMappingCommandDUnitTest { private static final String TEST_REGION = "testRegion"; + private static final String GROUP1_REGION = "group1Region"; + private static final String GROUP2_REGION = "group2Region"; private static final String TEST_GROUP1 = "testGroup1"; - // private static final String TEST_GROUP2 = "testGroup2"; + private static final String TEST_GROUP2 = "testGroup2"; @Rule public transient GfshCommandRule gfsh = new GfshCommandRule(); @@ -75,15 +77,16 @@ public class CreateMappingCommandDUnitTest { private MemberVM locator; private MemberVM server1; private MemberVM server2; + private MemberVM server3; + private MemberVM server4; @Before public void before() throws Exception { locator = startupRule.startLocatorVM(0); server1 = startupRule.startServerVM(1, locator.getPort()); server2 = startupRule.startServerVM(2, TEST_GROUP1, locator.getPort()); -// TODO: -// create a TEST_GROUP2 to contain server3 -// create a TEST_GROUP3 to contain both server2 and server3 +server3 = startupRule.startServerVM(3, TEST_GROUP2, locator.getPort()); +server4 = startupRule.startServerVM(4, TEST_GROUP1 + "," + TEST_GROUP2, locator.getPort()); gfsh.connectAndVerify(locator); @@ -94,6 +97,7 @@ public class CreateMappingCommandDUnitTest { startupRule.stop(1); startupRule.stop(2); startupRule.stop(3); +startupRule.stop(4); gfsh.disconnect(); } @@ -110,9 +114,9 @@ public class CreateMappingCommandDUnitTest { } // TODO: might need a parameter for server group names - private void setupGroupReplicate(String regionName) { + private void setupGroupReplicate(String regionName, String groupNames) { gfsh.executeAndAssertThat( -"create region --name=" + regionName + " --type=REPLICATE --groups=" + TEST_GROUP1) +"create region --name=" + regionName + " --type=REPLICATE --groups=" + groupNames) .statusIsSuccess(); } @@ -121,6 +125,11 @@ public class CreateMappingCommandDUnitTest { .statusIsSuccess(); } + private void setupGroupPartition(String regionName, String groupNames) { +gfsh.executeAndAssertThat("create region --name=" + regionName + " --type=PARTITION --groups=" + groupNames) +.statusIsSuccess(); + } + private void setupAsyncEventQueue(String regionName) { gfsh.executeAndAssertThat( "create async-event-queue --id=" @@ -209,9 +218,9 @@ public class CreateMappingCommandDUnitTest { } @Test - @Parameters({TEST_REGION, "/" + TEST_REGION}) - public void createMappingUpdatesServiceAndClusterConfigForServerGroup(String regionName) { -setupGroupReplicate(regionName); + @Parameters({GROUP1_REGION, "/" + GROUP1_REGION}) + public void createMappingReplicatedUpdatesServiceAndClusterConfigForServerGroup(String regionName) { +setupGroupReplicate(regionName, TEST_GROUP1); CommandStringBuilder csb = new CommandStringBuilder(CREATE_MAPPING); csb.addOption(REGION_NAME, regionName); csb.addOption(DATA_SOURCE_NAME, "connection"); @@ -224,7 +233,7 @@ public class CreateMappingCommandDUnitTest {
[geode] branch develop updated: GEODE-6255: Make ManagementListener testable and interruptible
This is an automated email from the ASF dual-hosted git repository. klund pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new c54983e GEODE-6255: Make ManagementListener testable and interruptible c54983e is described below commit c54983e97b1dcf2e8100d3df23916b8b077d9e7f Author: Kirk Lund AuthorDate: Fri Jan 18 15:09:12 2019 -0800 GEODE-6255: Make ManagementListener testable and interruptible --- .../internal/beans/ManagementListener.java | 20 .../internal/beans/ManagementListenerTest.java | 16 +--- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementListener.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementListener.java index 06314bf..a82a7fb 100644 --- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementListener.java +++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/ManagementListener.java @@ -17,6 +17,7 @@ package org.apache.geode.management.internal.beans; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; +import org.apache.geode.CancelCriterion; import org.apache.geode.annotations.VisibleForTesting; import org.apache.geode.cache.DiskStore; import org.apache.geode.cache.Region; @@ -41,6 +42,8 @@ public class ManagementListener implements ResourceEventsListener { private final InternalDistributedSystem system; + private final CancelCriterion cancelCriterion; + /** * Adapter to co-ordinate between GemFire and Federation framework */ @@ -52,12 +55,15 @@ public class ManagementListener implements ResourceEventsListener { private final ReadWriteLock readWriteLock; public ManagementListener(InternalDistributedSystem system) { -this(system, new ManagementAdapter(), new ReentrantReadWriteLock()); +this(system.getCancelCriterion(), system, new ManagementAdapter(), +new ReentrantReadWriteLock()); } @VisibleForTesting - ManagementListener(InternalDistributedSystem system, ManagementAdapter adapter, + ManagementListener(CancelCriterion cancelCriterion, InternalDistributedSystem system, + ManagementAdapter adapter, ReadWriteLock readWriteLock) { +this.cancelCriterion = cancelCriterion; this.system = system; this.adapter = adapter; this.readWriteLock = readWriteLock; @@ -105,10 +111,16 @@ public class ManagementListener implements ResourceEventsListener { } try { if (event == ResourceEvent.CACHE_CREATE || event == ResourceEvent.CACHE_REMOVE) { -readWriteLock.writeLock().lock(); +readWriteLock.writeLock().lockInterruptibly(); } else if (event != ResourceEvent.SYSTEM_ALERT) { -readWriteLock.readLock().lock(); +readWriteLock.readLock().lockInterruptibly(); } +} catch (InterruptedException e) { + // prefer CancelException if shutting down + cancelCriterion.checkCancelInProgress(e); + throw new RuntimeException(e); +} +try { switch (event) { case CACHE_CREATE: InternalCache createdCache = (InternalCache) resource; diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/beans/ManagementListenerTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/beans/ManagementListenerTest.java index 9542e12..585d2a1 100644 --- a/geode-core/src/test/java/org/apache/geode/management/internal/beans/ManagementListenerTest.java +++ b/geode-core/src/test/java/org/apache/geode/management/internal/beans/ManagementListenerTest.java @@ -34,6 +34,7 @@ import org.junit.Test; import org.junit.experimental.categories.Category; import org.mockito.InOrder; +import org.apache.geode.CancelCriterion; import org.apache.geode.distributed.internal.InternalDistributedSystem; import org.apache.geode.distributed.internal.ResourceEvent; import org.apache.geode.internal.cache.InternalCache; @@ -71,7 +72,8 @@ public class ManagementListenerTest { readLockInOrder = inOrder(readLock, readLock); writeLockInOrder = inOrder(writeLock, writeLock); -managementListener = new ManagementListener(system, managementAdapter, readWriteLock); +managementListener = new ManagementListener(mock(CancelCriterion.class), system, +managementAdapter, readWriteLock); } @Test @@ -109,18 +111,18 @@ public class ManagementListenerTest { } @Test - public void handleEventUsesWriteLockForCacheCreateEvent() { + public void handleEventUsesWriteLockForCacheCreateEvent() throws InterruptedException { managementListener.handleEvent(CACHE_CREATE, null); -writeLockInOrder.verify(writeLock).lock(); +writeLockInOrder.verify(writeLock).lockInterruptibly();
[geode-native] branch develop updated (ed8a29a -> 7dae2c1)
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git. from ed8a29a Merge branch 'feature/GEODE-4346' into develop new 0751151 GEODE-2484: Fixes IPO/WPO on windows. new 4fa0d40 GEODE-2484: Improve old integration test stability with jmx port per test. new ca01ef5 GEODE-2484: Cleanup ExpiryTaskManager new 7dae2c1 GEODE-2484: Replace ACE TSS with thread_local in TSSTXStateWrapper The 981 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CMakeLists.txt | 12 cppcache/CMakeLists.txt| 1 - cppcache/integration-test/CacheHelper.cpp | 7 +++-- cppcache/integration-test/CacheHelper.hpp | 6 cppcache/src/CacheTransactionManagerImpl.cpp | 30 +-- cppcache/src/ExecutionImpl.cpp | 2 +- cppcache/src/ExpiryTaskManager.cpp | 25 cppcache/src/ExpiryTaskManager.hpp | 22 +- .../src/InternalCacheTransactionManager2PCImpl.cpp | 6 ++-- cppcache/src/LocalRegion.cpp | 10 +++ cppcache/src/LocalRegion.hpp | 4 +-- cppcache/src/PdxTypeRegistry.cpp | 3 +- cppcache/src/TSSTXStateWrapper.cpp | 12 ++-- cppcache/src/TSSTXStateWrapper.hpp | 34 +++--- cppcache/src/TXCleaner.cpp | 17 --- cppcache/src/TXCleaner.hpp | 1 - cppcache/src/TcrMessage.cpp| 2 +- cppcache/src/ThinClientPoolDM.cpp | 22 +++--- cppcache/src/ThinClientPoolStickyDM.cpp| 2 +- cppcache/src/ThinClientRegion.cpp | 4 +-- cppcache/src/TransactionSuspender.cpp | 14 +++-- cppcache/src/TransactionSuspender.hpp | 16 -- cppcache/static/CMakeLists.txt | 18 cryptoimpl/CMakeLists.txt | 1 - dependencies/boost/CMakeLists.txt | 3 +- 25 files changed, 112 insertions(+), 162 deletions(-)
[geode] branch develop updated: GEODE-6302 Improve checkPom check and reporting (#3107)
This is an automated email from the ASF dual-hosted git repository. rhoughton pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new b393482 GEODE-6302 Improve checkPom check and reporting (#3107) b393482 is described below commit b393482e09c77853560661a289a9785449146a1f Author: Robert Houghton AuthorDate: Wed Jan 23 10:12:01 2019 -0800 GEODE-6302 Improve checkPom check and reporting (#3107) * Verify versions exist only in * Check pom * Check pom * Check all values of * Check all values of * Improved task caching * Safeguard against regression in expected poms. * Correct those poms which did not adhere to the above. * Once fully moved to BOMs for dependency tracking, some further changes to the compare will be needed --- .../src/test/resources/expected-pom.xml| 20 + geode-assembly/build.gradle| 4 +- geode-assembly/src/test/resources/expected-pom.xml | 20 + geode-common/src/test/resources/expected-pom.xml | 20 + .../src/test/resources/expected-pom.xml| 20 + .../src/test/resources/expected-pom.xml| 22 +- geode-core/build.gradle| 2 +- geode-core/src/test/resources/expected-pom.xml | 24 +- geode-cq/src/test/resources/expected-pom.xml | 21 +- geode-dunit/src/test/resources/expected-pom.xml| 23 +- .../src/test/resources/expected-pom.xml| 22 +- geode-json/src/test/resources/expected-pom.xml | 20 + geode-junit/src/test/resources/expected-pom.xml| 20 + geode-lucene/src/test/resources/expected-pom.xml | 22 +- .../src/test/resources/expected-pom.xml| 25 +- .../src/test/resources/expected-pom.xml| 21 +- geode-protobuf-messages/build.gradle | 3 +- .../src/test/resources/expected-pom.xml| 695 - geode-protobuf/build.gradle| 2 +- geode-protobuf/src/test/resources/expected-pom.xml | 24 +- geode-pulse/src/test/resources/expected-pom.xml| 20 + geode-rebalancer/build.gradle | 1 - .../src/test/resources/expected-pom.xml| 22 +- geode-wan/src/test/resources/expected-pom.xml | 21 +- geode-web-api/src/test/resources/expected-pom.xml | 20 + .../src/test/resources/expected-pom.xml| 37 +- geode-web/src/test/resources/expected-pom.xml | 20 + gradle.properties | 2 +- gradle/geode-dependency-management.gradle | 6 +- gradle/publish.gradle | 178 -- 30 files changed, 1255 insertions(+), 102 deletions(-) diff --git a/boms/geode-all-bom/src/test/resources/expected-pom.xml b/boms/geode-all-bom/src/test/resources/expected-pom.xml index 79754ad..d3f81a9 100644 --- a/boms/geode-all-bom/src/test/resources/expected-pom.xml +++ b/boms/geode-all-bom/src/test/resources/expected-pom.xml @@ -113,6 +113,11 @@ 4.3.20.RELEASE +org.apache.geode +geode-web-management +1.9.0-SNAPSHOT + + com.carrotsearch.randomizedtesting randomizedtesting-runner 2.5.0 @@ -383,6 +388,11 @@ 1.1.0 +com.google.protobuf +protobuf-gradle-plugin +0.8.6 + + javax.servlet javax.servlet-api 3.1.0 @@ -418,6 +428,11 @@ 1.9.0-SNAPSHOT +org.apache.geode +geode-management +1.9.0-SNAPSHOT + + com.mockrunner mockrunner-servlet 1.1.2 @@ -693,6 +708,11 @@ 2.1 +org.eclipse.jetty +jetty-webapp +9.4.12.v20180830 + + com.pholser junit-quickcheck-core 0.8.1 diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle index 78f43c5..37740d3 100755 --- a/geode-assembly/build.gradle +++ b/geode-assembly/build.gradle @@ -27,11 +27,13 @@ apply from: "${project.projectDir}/../gradle/publish.gradle" // disable artifact generation for this project jar.enabled = false +project.ext {artifactName = 'apache-geode'} + publishing { publications { maven(MavenPublication) { afterEvaluate { -artifactId = 'apache-geode' +artifactId = artifactName artifacts = [] diff --git a/geode-assembly/src/test/resources/expected-pom.xml b/geode-assembly/src/test/resources/expected-pom.xml index 54828a9..af1f45a 100644 --- a/geode-assembly/src/test/resources/expected-pom.xml +++ b/geode-assembly/src/test/resources/expected-pom.xml @@ -113,6 +113,11 @@ 4.3.20.RELEASE +org.apache.geode +geode-web-management +1.9.0-SNAPSHOT + + com.carrotsearch.randomizedtesting
[geode] branch add_180_to_old_versions deleted (was f4e86b2)
This is an automated email from the ASF dual-hosted git repository. prhomberg pushed a change to branch add_180_to_old_versions in repository https://gitbox.apache.org/repos/asf/geode.git. was f4e86b2 Turning CI on and off again This change permanently discards the following revisions: discard f4e86b2 Turning CI on and off again discard 95d173b Add 1.8.0 to old versions
[geode] branch develop updated: GEODE-6267: Logged out subject
This is an automated email from the ASF dual-hosted git repository. boglesby pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new f2a1248 GEODE-6267: Logged out subject f2a1248 is described below commit f2a124863e294d79e029857893d26bd7e7f69172 Author: Barry Oglesby AuthorDate: Wed Jan 23 08:57:31 2019 -0800 GEODE-6267: Logged out subject --- ...ientServerConnectDisconnectDistributedTest.java | 178 + .../cache/tier/sockets/CacheClientProxy.java | 24 ++- .../cache/tier/sockets/ClientUserAuths.java| 13 ++ .../cache/tier/sockets/ServerConnection.java | 6 + 4 files changed, 219 insertions(+), 2 deletions(-) diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientServerConnectDisconnectDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientServerConnectDisconnectDistributedTest.java new file mode 100644 index 000..9c0086e --- /dev/null +++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientServerConnectDisconnectDistributedTest.java @@ -0,0 +1,178 @@ +/* + * 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.cache.tier.sockets; + +import static org.apache.geode.test.awaitility.GeodeAwaitility.await; +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import org.apache.shiro.subject.Subject; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.RegionShortcut; +import org.apache.geode.cache.client.ClientCache; +import org.apache.geode.cache.client.ClientRegionShortcut; +import org.apache.geode.cache.server.CacheServer; +import org.apache.geode.examples.SimpleSecurityManager; +import org.apache.geode.internal.cache.CacheServerImpl; +import org.apache.geode.test.dunit.rules.ClientVM; +import org.apache.geode.test.dunit.rules.ClusterStartupRule; +import org.apache.geode.test.dunit.rules.MemberVM; +import org.apache.geode.test.junit.categories.SecurityTest; + +@Category({SecurityTest.class}) +public class ClientServerConnectDisconnectDistributedTest implements Serializable { + + @ClassRule + public static ClusterStartupRule cluster = new ClusterStartupRule(); + + private static MemberVM locator; + private static MemberVM server; + private static ClientVM client; + + private static List serverConnectionSubjects; + + private static Subject proxySubject; + + private static List authorizations; + + @BeforeClass + public static void beforeClass() { +locator = cluster.startLocatorVM(0, l -> l.withSecurityManager(SimpleSecurityManager.class)); +int locatorPort = locator.getPort(); +server = cluster.startServerVM(1, s -> s.withCredential("cluster", "cluster") + .withConnectionToLocator(locatorPort).withRegion(RegionShortcut.PARTITION, +"ClientServerConnectDisconnectDistributedTest_region")); + } + + @Test + public void testClientConnectDisconnect() throws Exception { +// Connect client +int locatorPort = locator.getPort(); +client = cluster.startClientVM(3, c -> c.withCredential("data", "data") +.withPoolSubscription(true) +.withLocatorConnection(locatorPort)); + +// Do some puts +client.invoke(() -> { + ClientCache cache = ClusterStartupRule.getClientCache(); + Region region = cache.createClientRegionFactory(ClientRegionShortcut.PROXY) + .create("ClientServerConnectDisconnectDistributedTest_region"); + for (int i = 0; i < 10; i++) { +Object key = String.valueOf(i); +region.put(key, key); + } +}); + +// Verify client sessions are logged in on the server +server.invoke(() -> verifySubjectsAreLoggedIn()); + +// Close client +client.invoke(() -> { + ClusterStartupRule.getClientCache().close(); +
[geode] branch feature/GEODE-6267 deleted (was 80c82f4)
This is an automated email from the ASF dual-hosted git repository. boglesby pushed a change to branch feature/GEODE-6267 in repository https://gitbox.apache.org/repos/asf/geode.git. was 80c82f4 GEODE-6267: Modified test to wait for ServerConnections and CacheClientProxy to be closed The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[geode] branch develop updated: GEODE-6307: Attempt to normalize file paths for correct comparison (#3104)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 876c84c GEODE-6307: Attempt to normalize file paths for correct comparison (#3104) 876c84c is described below commit 876c84c925c198c494341b572e31ad9a244c2b92 Author: Jens Deppe AuthorDate: Wed Jan 23 08:06:39 2019 -0800 GEODE-6307: Attempt to normalize file paths for correct comparison (#3104) - Trying to fix an issue with AnalyzeSerializablesJUnitTest on Windows and JDK 11. --- .../codeAnalysis/AnalyzeSerializablesJUnitTestBase.java| 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTestBase.java b/geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTestBase.java index fab9981..8d493ba 100644 --- a/geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTestBase.java +++ b/geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTestBase.java @@ -36,6 +36,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -45,6 +46,7 @@ import java.util.Map; import java.util.Properties; import java.util.ServiceLoader; import java.util.Set; +import java.util.stream.Collectors; import org.apache.commons.lang3.JavaVersion; import org.apache.commons.lang3.SystemUtils; @@ -428,16 +430,20 @@ public abstract class AnalyzeSerializablesJUnitTestBase { String classpath = System.getProperty("java.class.path"); System.out.println("java classpath is " + classpath); -String[] entries = classpath.split(File.pathSeparator); +List entries = +Arrays.stream(classpath.split(File.pathSeparator)).map(x -> new File(x)).collect( +Collectors.toList()); String gradleBuildDirName = Paths.get(getModuleName(), "build", "classes", "java", "main").toString(); +System.out.println("gradleBuildDirName is " + gradleBuildDirName); String ideaBuildDirName = Paths.get(getModuleName(), "out", "production", "classes").toString(); String buildDir = null; -for (String entry : entries) { +for (File entry : entries) { System.out.println("examining '" + entry + "'"); - if (entry.endsWith(gradleBuildDirName) || entry.endsWith(ideaBuildDirName)) { -buildDir = entry; + if (entry.toString().endsWith(gradleBuildDirName) + || entry.toString().endsWith(ideaBuildDirName)) { +buildDir = entry.toString(); break; } }