[geode] branch develop updated: GEODE-5646 Client throws ToDataException when locator is shutting down
This is an automated email from the ASF dual-hosted git repository. bschuchardt 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 3651a9a GEODE-5646 Client throws ToDataException when locator is shutting down 3651a9a is described below commit 3651a9a9b3819948da18e02b7fc64c3493f6d886 Author: Bruce Schuchardt AuthorDate: Mon Aug 27 15:22:47 2018 -0700 GEODE-5646 Client throws ToDataException when locator is shutting down Catch and handle ToDataException. Reviewed by mhanson --- .../AutoConnectionSourceImplJUnitTest.java | 24 ++ .../client/internal/AutoConnectionSourceImpl.java | 16 +-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java index 6176e13..3758049 100644 --- a/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java +++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java @@ -19,6 +19,11 @@ import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.isA; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.powermock.api.mockito.PowerMockito.when; import java.io.IOException; import java.net.ConnectException; @@ -47,6 +52,7 @@ import org.junit.contrib.java.lang.system.RestoreSystemProperties; import org.junit.experimental.categories.Category; import org.apache.geode.CancelCriterion; +import org.apache.geode.ToDataException; import org.apache.geode.cache.Cache; import org.apache.geode.cache.CacheFactory; import org.apache.geode.cache.GemFireCache; @@ -57,6 +63,7 @@ import org.apache.geode.cache.client.SubscriptionNotEnabledException; import org.apache.geode.cache.client.internal.locator.ClientConnectionRequest; import org.apache.geode.cache.client.internal.locator.ClientConnectionResponse; import org.apache.geode.cache.client.internal.locator.LocatorListResponse; +import org.apache.geode.cache.client.internal.locator.ServerLocationRequest; import org.apache.geode.cache.query.QueryService; import org.apache.geode.distributed.DistributedSystem; import org.apache.geode.distributed.internal.DistributionConfig; @@ -74,6 +81,7 @@ import org.apache.geode.internal.cache.tier.InternalClientMembership; import org.apache.geode.internal.cache.tier.sockets.TcpServerFactory; import org.apache.geode.management.membership.ClientMembershipEvent; import org.apache.geode.management.membership.ClientMembershipListener; +import org.apache.geode.test.dunit.NetworkUtils; import org.apache.geode.test.junit.categories.ClientServerTest; @SuppressWarnings("deprecation") @@ -234,6 +242,22 @@ public class AutoConnectionSourceImplJUnitTest { } @Test + public void testSourceHandlesToDataException() throws IOException, ClassNotFoundException { +TcpClient mockConnection = mock(TcpClient.class); +when(mockConnection.requestToServer(isA(InetSocketAddress.class), any(Object.class), +isA(Integer.class), isA(Boolean.class))).thenThrow(new ToDataException("testing")); +try { + InetSocketAddress address = new InetSocketAddress(NetworkUtils.getServerHostName(), 1234); + source.queryOneLocatorUsingConnection(new HostAddress(address, "locator[1234]"), mock( + ServerLocationRequest.class), mockConnection); + verify(mockConnection).requestToServer(isA(InetSocketAddress.class), + isA(ServerLocationRequest.class), isA(Integer.class), isA(Boolean.class)); +} catch (NoAvailableLocatorsException expected) { + // do nothing +} + } + + @Test public void testServerLocationUsedInListenerNotification() throws Exception { final ClientMembershipEvent[] listenerEvents = new ClientMembershipEvent[1]; diff --git a/geode-core/src/main/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImpl.java b/geode-core/src/main/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImpl.java index efb39d6..a1c87a4 100644 --- a/geode-core/src/main/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImpl.java +++ b/geode-core/src/main/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImpl.java @@ -32,6 +32,7 @@ import java.util.concurrent.atomic.AtomicReference; import org.apache.logging.log4j.Logger; +import org.apache.geode.ToDataException; import
[geode] branch develop updated: GEODE-5642 remove gradle task :cleanAll (#2385)
This is an automated email from the ASF dual-hosted git repository. jbarrett 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 48fe306 GEODE-5642 remove gradle task :cleanAll (#2385) 48fe306 is described below commit 48fe306dcb699f64c15f8e8faba6fc2246ee45d1 Author: FSOUTHERLAND <39743785+fsoutherl...@users.noreply.github.com> AuthorDate: Mon Aug 27 14:45:49 2018 -0700 GEODE-5642 remove gradle task :cleanAll (#2385) Co-authored-by: Finn Southerland --- build.gradle | 10 -- 1 file changed, 10 deletions(-) diff --git a/build.gradle b/build.gradle index 52dae34..3539e79 100755 --- a/build.gradle +++ b/build.gradle @@ -68,13 +68,6 @@ allprojects { } } -task cleanAll(type: Delete) { - delete rootProject.buildDir - if (!buildRoot.isEmpty()) { -delete buildRoot - } -} - // allow external projects to override include location if (name == 'geode') { ext.scriptDir = 'gradle' @@ -95,9 +88,6 @@ apply from: "${scriptDir}/docker.gradle" apply from: "${scriptDir}/spotless.gradle" subprojects { - // Make sure clean task for rootProject runs last - clean.finalizedBy rootProject.cleanAll - apply plugin: 'com.github.ben-manes.versions' }
[geode] branch feature/GEODE-5624 updated: wip.
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch feature/GEODE-5624 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-5624 by this push: new 8e85388 wip. 8e85388 is described below commit 8e85388d62d6a1996faf2eebb43119796439803f Author: eshu AuthorDate: Mon Aug 27 14:26:57 2018 -0700 wip. --- .../src/main/java/org/apache/geode/internal/cache/TXState.java | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java index 9be7f39..5263e2e 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java @@ -878,7 +878,7 @@ public class TXState implements TXStateInterface { } } - protected void doCleanup() { + void doCleanup() { IllegalArgumentException iae = null; try { this.closed = true; @@ -1029,6 +1029,7 @@ public class TXState implements TXStateInterface { */ @Override public synchronized void beforeCompletion() throws SynchronizationCommitConflictException { +proxy.getTxMgr().setTXState(null); if (this.closed) { throw new TXManagerCancelledException(); } @@ -1051,7 +1052,6 @@ public class TXState implements TXStateInterface { } void doBeforeCompletion() { -proxy.getTxMgr().setTXState(null); final long opStart = CachePerfStats.getStatTime(); this.jtaLifeTime = opStart - getBeginTime(); @@ -1131,7 +1131,6 @@ public class TXState implements TXStateInterface { Assert.assertTrue(this.locks != null, "Gemfire Transaction afterCompletion called with illegal state."); try { -proxy.getTxMgr().setTXState(null); commit(); saveTXCommitMessageForClientFailover(); } catch (CommitConflictException error) { @@ -1144,7 +1143,6 @@ public class TXState implements TXStateInterface { break; case Status.STATUS_ROLLEDBACK: this.jtaLifeTime = opStart - getBeginTime(); - this.proxy.getTxMgr().setTXState(null); rollback(); saveTXCommitMessageForClientFailover(); this.proxy.getTxMgr().noteRollbackSuccess(opStart, this.jtaLifeTime, this);
[geode] branch feature/GEODE-5624 updated: wip.
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch feature/GEODE-5624 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-5624 by this push: new e74c940 wip. e74c940 is described below commit e74c940c428e2455dc0b93006e57428f3a12c924 Author: eshu AuthorDate: Mon Aug 27 13:59:21 2018 -0700 wip. --- .../src/main/java/org/apache/geode/internal/cache/TXState.java | 4 ++-- .../src/test/java/org/apache/geode/internal/cache/TXStateTest.java | 5 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java index d0063a6..9be7f39 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java @@ -1042,11 +1042,11 @@ public class TXState implements TXStateInterface { getExecutor(), getCancelCriterion()); } - Executor getExecutor() { + private Executor getExecutor() { return getCache().getDistributionManager().getWaitingThreadPool(); } - CancelCriterion getCancelCriterion() { + private CancelCriterion getCancelCriterion() { return getCache().getCancelCriterion(); } diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/TXStateTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/TXStateTest.java index c1e9acf..21fadf0 100644 --- a/geode-core/src/test/java/org/apache/geode/internal/cache/TXStateTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/cache/TXStateTest.java @@ -27,8 +27,6 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import java.util.concurrent.Executor; - import javax.transaction.Status; import org.junit.Before; @@ -56,7 +54,6 @@ public class TXStateTest { @Test public void doBeforeCompletionThrowsIfReserveAndCheckFails() { TXState txState = spy(new TXState(txStateProxy, true)); -doReturn(mock(Executor.class)).when(txState).getExecutor(); doThrow(exception).when(txState).reserveAndCheck(); assertThatThrownBy(() -> txState.doBeforeCompletion()) @@ -66,7 +63,6 @@ public class TXStateTest { @Test public void doAfterCompletionThrowsIfCommitFails() { TXState txState = spy(new TXState(txStateProxy, true)); -doReturn(mock(InternalCache.class)).when(txState).getCache(); doReturn(true).when(txState).wasBeforeCompletionCalled(); txState.reserveAndCheck(); doThrow(transactionDataNodeHasDepartedException).when(txState).commit(); @@ -78,7 +74,6 @@ public class TXStateTest { @Test public void doAfterCompletionCanCommitJTA() { TXState txState = spy(new TXState(txStateProxy, false)); -doReturn(mock(InternalCache.class)).when(txState).getCache(); txState.reserveAndCheck(); txState.closed = true; doReturn(true).when(txState).wasBeforeCompletionCalled();
[geode] branch feature/GEODE-5624 updated: wip.
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch feature/GEODE-5624 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-5624 by this push: new c19decb wip. c19decb is described below commit c19decb1e2ea05b7b40a265f01afc3e2f237b167 Author: eshu AuthorDate: Mon Aug 27 13:51:39 2018 -0700 wip. --- .../geode/internal/jta/ClientServerJTAFailoverDistributedTest.java | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/jta/ClientServerJTAFailoverDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/jta/ClientServerJTAFailoverDistributedTest.java index d518153..5d60b6b 100644 --- a/geode-core/src/distributedTest/java/org/apache/geode/internal/jta/ClientServerJTAFailoverDistributedTest.java +++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/jta/ClientServerJTAFailoverDistributedTest.java @@ -192,9 +192,9 @@ public class ClientServerJTAFailoverDistributedTest implements Serializable { TXManagerImpl txManager = (TXManagerImpl) cache.getCacheTransactionManager(); txManager.begin(); region.put(key, newValue); -if (hasReplicateRegion) +if (hasReplicateRegion) { replicateRegion.put(key, newValue); - +} TXStateProxyImpl txStateProxy = (TXStateProxyImpl) txManager.getTXState(); ClientTXStateStub clientTXStateStub = (ClientTXStateStub) txStateProxy.getRealDeal(null, null); clientTXStateStub.beforeCompletion(); @@ -223,8 +223,9 @@ public class ClientServerJTAFailoverDistributedTest implements Serializable { } if (isCommit) { assertEquals(newValue, region.get(key)); - if (hasReplicateRegion) + if (hasReplicateRegion) { assertEquals(newValue, replicateRegion.get(key)); + } } else { assertEquals(value, region.get(key)); }
[geode] branch feature/GEODE-5624 updated (13b6cfe -> 5ebd326)
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a change to branch feature/GEODE-5624 in repository https://gitbox.apache.org/repos/asf/geode.git. from 13b6cfe more refactoring. new bc42e83 restore catch InternalGemFireError. add 9f13a5b GEODE-5610: CI Failure: DiskRegionJUnitTest testAssertionErrorIfMissingOplog (#2357) add c7ca13d GEODE-5460: Fixing a race condition in TestFunctionsDUNitTest add 6ee86d6 GEODE-5597 verify geode-dependency jar ClassPath (#2369) add 879b2cd GEODE-5597: Fixes formatting. add a1f747c GEODE-5440: when we need re-evaluate a entry in a index, we need to pass in the outer value key in the equiJoin. (#2338) add abb2702 GEODE-5630: fix use of Awaitility in BucketCreationCrashCompletesRegressionTest add 9be422c GEODE-5617: FIxing a race in AutoBalancerJUnitTest add cfa7ca5 GEODE-5627: ConcurrencyRule passes when not used. (#2370) add 39b2236 GEODE-5597 let AssemblyContentsIntegrationTest pass on windows add 583d141 GEODE-5562 Reading the values of LocalRegion.memoryThresholdReached and DistributedRegion.memoryThresholdReachedMembers must be atomic (#2320) add 9de289d GEODE-5632: import Assertions instead of AssertionsForClassTypes add b951146 GEODE-5142 new Thread Monitoring Mechanism add 123b8c4 GEODE-5614: rename DistributedTestRule as DistributedRule add 16d0f69 GEODE-5614: rename distributedTestRule field to distributedRule add f91c2df GEODE-5614: update RegionManagementDUnitTest usage of DistributedRule add e719331 GEODE-5629: Changing GMSEncryptJUnitTest to use ConcurrencyRule add a383053 GEODE-5623: Use Awaitility in StopLcoatorCommandDUnitTest (#2379) add 85953f0 GEODE-5631: failedBatchRemovalMessageKeys not used after GII (#2375) add 45138b4 GEODE-5630: fixup usage of Awaitility add 0cbf8e5 GEODE-5620: Adds project property to control test forking add 76af1dd GEODE-5597 Publish geode artifacts to maven repo on GCS (#2347) new 5ebd326 Merge remote-tracking branch 'origin/develop' into feature/GEODE-5624 The 2 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: build.gradle | 2 +- ci/pipelines/geode-build/deploy_pipeline.sh| 2 + ci/pipelines/geode-build/jinja.template.yml| 39 ++- ci/scripts/publish.sh | 96 ++ geode-assembly/build.gradle| 47 +-- .../cli/commands/StopLocatorCommandDUnitTest.java | 29 +- .../geode/AssemblyContentsIntegrationTest.java | 4 +- ...java => GeodeDependencyJarIntegrationTest.java} | 69 +++-- .../resources/dependency_classpath.txt | 67 + .../test/junit/rules/MySqlConnectionRule.java | 5 +- .../junit/rules/SqlDatabaseConnectionRule.java | 4 +- .../geode/connectors/jdbc/JdbcAsyncWriterTest.java | 4 +- .../geode/connectors/jdbc/JdbcWriterTest.java | 2 +- geode-core/build.gradle| 14 +- .../CreateAndLocalDestroyInTXRegressionTest.java | 7 +- .../PRCreationTotalNumBucketsDistributedTest.java | 8 +- .../cache/RegionClearStatsDistributedTest.java | 8 +- .../cache/RegionExpirationDistributedTest.java | 8 +- .../ReplicateCacheListenerDistributedTest.java | 18 +- .../internal/AutoConnectionSourceDUnitTest.java| 3 +- .../management/MemoryThresholdsDUnitTest.java | 2 +- .../MemoryThresholdsOffHeapDUnitTest.java | 18 +- .../dunit/QueryDataInconsistencyDUnitTest.java | 34 +-- .../query/dunit/QueryIndexUsingXMLDUnitTest.java | 3 +- .../partitioned/PRColocatedEquiJoinDUnitTest.java | 47 --- .../query/partitioned/PRQueryDUnitHelper.java | 86 +- .../geode/cache30/DiskRegionDistributedTest.java | 11 +- ...okenSerializationConsistencyRegressionTest.java | 8 +- .../cache/BucketCreationCrashRegressionTest.java | 11 +- ...ntServerTransactionFailoverDistributedTest.java | 35 +-- ...overWithMixedVersionServersDistributedTest.java | 44 +-- .../EntriesDoNotExpireDuringGiiRegressionTest.java | 14 +- ...zedDiskRegionWithIoExceptionRegressionTest.java | 18 +- .../cache/PRCustomPartitioningDistributedTest.java | 10 +- .../PREntryIdleExpirationDistributedTest.java | 31 +- .../internal/cache/PRQueryDistributedTest.java | 8 +- .../PRQueryWithIndexAndPdxDistributedTest.java | 9 +- .../cache/PRQueryWithIndexDistributedTest.java | 9 +- .../cache/PRQueryWithOrderByDistributedTest.java | 9 +- ...RQueryWithPdxDuringRebalanceRegressionTest.java | 9 +- .../PRWithIndexAfterRebalanceRegressionTest.java | 9 +- .../PartitionedRegionCloseDistributedTest.java | 19 +-
[geode] 02/02: Merge remote-tracking branch 'origin/develop' into feature/GEODE-5624
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch feature/GEODE-5624 in repository https://gitbox.apache.org/repos/asf/geode.git commit 5ebd326244f3033abf70610251eab2416b7688df Merge: bc42e83 76af1dd Author: eshu AuthorDate: Mon Aug 27 13:45:37 2018 -0700 Merge remote-tracking branch 'origin/develop' into feature/GEODE-5624 build.gradle | 2 +- ci/pipelines/geode-build/deploy_pipeline.sh| 2 + ci/pipelines/geode-build/jinja.template.yml| 39 ++- ci/scripts/publish.sh | 96 ++ geode-assembly/build.gradle| 47 +-- .../cli/commands/StopLocatorCommandDUnitTest.java | 29 +- .../geode/AssemblyContentsIntegrationTest.java | 4 +- ...java => GeodeDependencyJarIntegrationTest.java} | 69 +++-- .../resources/dependency_classpath.txt | 67 + .../test/junit/rules/MySqlConnectionRule.java | 5 +- .../junit/rules/SqlDatabaseConnectionRule.java | 4 +- .../geode/connectors/jdbc/JdbcAsyncWriterTest.java | 4 +- .../geode/connectors/jdbc/JdbcWriterTest.java | 2 +- geode-core/build.gradle| 14 +- .../CreateAndLocalDestroyInTXRegressionTest.java | 7 +- .../PRCreationTotalNumBucketsDistributedTest.java | 8 +- .../cache/RegionClearStatsDistributedTest.java | 8 +- .../cache/RegionExpirationDistributedTest.java | 8 +- .../ReplicateCacheListenerDistributedTest.java | 18 +- .../internal/AutoConnectionSourceDUnitTest.java| 3 +- .../management/MemoryThresholdsDUnitTest.java | 2 +- .../MemoryThresholdsOffHeapDUnitTest.java | 18 +- .../dunit/QueryDataInconsistencyDUnitTest.java | 34 +-- .../query/dunit/QueryIndexUsingXMLDUnitTest.java | 3 +- .../partitioned/PRColocatedEquiJoinDUnitTest.java | 47 --- .../query/partitioned/PRQueryDUnitHelper.java | 86 +- .../geode/cache30/DiskRegionDistributedTest.java | 11 +- ...okenSerializationConsistencyRegressionTest.java | 8 +- .../cache/BucketCreationCrashRegressionTest.java | 11 +- ...ntServerTransactionFailoverDistributedTest.java | 35 +-- ...overWithMixedVersionServersDistributedTest.java | 44 +-- .../EntriesDoNotExpireDuringGiiRegressionTest.java | 14 +- ...zedDiskRegionWithIoExceptionRegressionTest.java | 18 +- .../cache/PRCustomPartitioningDistributedTest.java | 10 +- .../PREntryIdleExpirationDistributedTest.java | 31 +- .../internal/cache/PRQueryDistributedTest.java | 8 +- .../PRQueryWithIndexAndPdxDistributedTest.java | 9 +- .../cache/PRQueryWithIndexDistributedTest.java | 9 +- .../cache/PRQueryWithOrderByDistributedTest.java | 9 +- ...RQueryWithPdxDuringRebalanceRegressionTest.java | 9 +- .../PRWithIndexAfterRebalanceRegressionTest.java | 9 +- .../PartitionedRegionCloseDistributedTest.java | 19 +- .../cache/PersistentRegionRecoveryDUnitTest.java | 19 +- .../cache/RegionListenerDistributedTest.java | 17 +- ...eplicateEntryIdleExpirationDistributedTest.java | 36 ++- .../cache/backup/BackupDistributedTest.java| 12 +- .../backup/IncrementalBackupDistributedTest.java | 12 +- .../PrepareAndFinishBackupDistributedTest.java | 6 +- .../ClientFunctionTimeoutRegressionTest.java | 26 +- ...ctionExecutionWithExceptionDistributedTest.java | 9 +- ...ctionOnBehalfOfClientMemberDistributedTest.java | 14 +- .../cache/ha/HARegionQueueSizeRegressionTest.java | 9 +- .../HARegionQueueThreadIdExpiryRegressionTest.java | 11 +- ...BucketCreationCrashCompletesRegressionTest.java | 55 ++-- .../BucketRebalanceStatRegressionTest.java | 4 +- ...RDiskConflictWithColocationDistributedTest.java | 5 +- ...PersistentPartitionedRegionDistributedTest.java | 21 +- .../PersistentPartitionedRegionRegressionTest.java | 7 +- ...eueRemovalMessageProcessingDistributedTest.java | 87 +++--- .../RegisterInterestKeysValuesDistributedTest.java | 50 ++-- .../DeltaPropagationFailureRegressionTest.java | 33 +-- .../AcceptorImplClientQueueDistributedTest.java| 42 +-- ...entDestroyRegionNotificationRegressionTest.java | 31 +- ...troyRegionUnregisterInterestRegressionTest.java | 31 +- .../ClientProxyWithDeltaDistributedTest.java | 34 +-- .../ClientWithInterestFailoverDistributedTest.java | 32 +- .../GetConnectedServerCountRegressionTest.java | 8 +- .../HARegionQueueStatsCloseRegressionTest.java | 24 +- .../MessageTrackingTimeoutRegressionTest.java | 18 +- ...nterestOnServerWithoutRegionRegressionTest.java | 15 +- ...isterInterestServerMetaDataDistributedTest.java | 44 ++- ...RootRegionsExcludesHARegionsRegressionTest.java | 24 +- .../AsyncEventListenerDistributedTest.java | 4 +- ...ventListenerWithCacheLoaderDistributedTest.java | 6 +- ...syncEventListenerWithFilterDistributedTest.java | 6 +-
[geode] 01/02: restore catch InternalGemFireError.
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch feature/GEODE-5624 in repository https://gitbox.apache.org/repos/asf/geode.git commit bc42e832365d3c0a4adfe8d2ea647da419b29c5a Author: eshu AuthorDate: Mon Aug 27 13:30:37 2018 -0700 restore catch InternalGemFireError. --- .../org/apache/geode/internal/cache/TXState.java | 54 -- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java index 83d00d1..d0063a6 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java @@ -33,6 +33,7 @@ import org.apache.logging.log4j.Logger; import org.apache.geode.CancelCriterion; import org.apache.geode.CancelException; +import org.apache.geode.InternalGemFireError; import org.apache.geode.SystemFailure; import org.apache.geode.cache.CommitConflictException; import org.apache.geode.cache.DiskAccessException; @@ -44,6 +45,7 @@ import org.apache.geode.cache.Region.Entry; import org.apache.geode.cache.RegionDestroyedException; import org.apache.geode.cache.SynchronizationCommitConflictException; import org.apache.geode.cache.TransactionDataRebalancedException; +import org.apache.geode.cache.TransactionException; import org.apache.geode.cache.TransactionId; import org.apache.geode.cache.TransactionWriter; import org.apache.geode.cache.TransactionWriterException; @@ -1123,31 +1125,35 @@ public class TXState implements TXStateInterface { void doAfterCompletion(int status) { final long opStart = CachePerfStats.getStatTime(); -switch (status) { - case Status.STATUS_COMMITTED: -Assert.assertTrue(this.locks != null, -"Gemfire Transaction afterCompletion called with illegal state."); -try { - proxy.getTxMgr().setTXState(null); - commit(); - saveTXCommitMessageForClientFailover(); -} catch (CommitConflictException error) { - Assert.assertTrue(false, "Gemfire Transaction " + getTransactionId() - + " afterCompletion failed.due to CommitConflictException: " + error); -} +try { + switch (status) { +case Status.STATUS_COMMITTED: + Assert.assertTrue(this.locks != null, + "Gemfire Transaction afterCompletion called with illegal state."); + try { +proxy.getTxMgr().setTXState(null); +commit(); +saveTXCommitMessageForClientFailover(); + } catch (CommitConflictException error) { +Assert.assertTrue(false, "Gemfire Transaction " + getTransactionId() ++ " afterCompletion failed.due to CommitConflictException: " + error); + } -this.proxy.getTxMgr().noteCommitSuccess(opStart, this.jtaLifeTime, this); -this.locks = null; -break; - case Status.STATUS_ROLLEDBACK: -this.jtaLifeTime = opStart - getBeginTime(); -this.proxy.getTxMgr().setTXState(null); -rollback(); -saveTXCommitMessageForClientFailover(); -this.proxy.getTxMgr().noteRollbackSuccess(opStart, this.jtaLifeTime, this); -break; - default: -Assert.assertTrue(false, "Unknown JTA Synchronization status " + status); + this.proxy.getTxMgr().noteCommitSuccess(opStart, this.jtaLifeTime, this); + this.locks = null; + break; +case Status.STATUS_ROLLEDBACK: + this.jtaLifeTime = opStart - getBeginTime(); + this.proxy.getTxMgr().setTXState(null); + rollback(); + saveTXCommitMessageForClientFailover(); + this.proxy.getTxMgr().noteRollbackSuccess(opStart, this.jtaLifeTime, this); + break; +default: + Assert.assertTrue(false, "Unknown JTA Synchronization status " + status); + } +} catch (InternalGemFireError error) { + throw new TransactionException(error); } }
[geode] branch concourse-staging updated (96c857c -> 16496e9)
This is an automated email from the ASF dual-hosted git repository. upthewaterspout pushed a change to branch concourse-staging in repository https://gitbox.apache.org/repos/asf/geode.git. discard 96c857c Pick up my changes, concourse discard eb7a045 GEODE-5615: Removing gradle build scan plugin discard 8b78197 Making gradle dump heap on OOME discard 17e5778 Fixing mismatched quotes discard 1083a9c GEODE-5615: Capturing call stacks for all java processes discard 29cc280 GEODE-5615: Capturing hprof files in build archive discard 3ed9331 Revert "Testing 36 parallel forks" discard 2fe5787 Limit max number of simultaneous runs to 5. discard 6e4f1af Testing 36 parallel forks discard 4abe35e Reducing the parallelism of DistributedTest add 7a1bfc4 GEODE-5575: Removes Travis CI add 18c3aee GEODE-5212: Resources must be given with '/' in the path regardless o… (#2312) add 6f8de00 GEODE-5541: A create followed by a destroy of the same key will not invoke cache listener on remote nodes. (#2282) add 4b41429 [GEODE-5580] Convert test-container image to use alpine. add 7a8891f Merge pull request #2321 from smgoller/GEODE-5580 add b2f8e2c GEODE-5578 Create small docker image for meta-pipeline jobs (#2319) add 34ce6cd GEODE-5530: Creates extensions/geode-module-test (#2313) add c4ee03d Revert "[GEODE-5580] Convert test-container image to use alpine." add 5e6d2db GEODE-5530: Creates geode-lucene/geode-lucene-test (#2317) add 83c6c09 GEODE-5530 Add geode-protobuf-test subproject for test-structure reuse (#2324) add 1d8c322 Reducing the parallelism of DistributedTest add 78c178d GEODE-5387: Adding job to the pr pipeline to stress new tests add 7299dd8 GEODE-5560 member becomes coordinator but then stops when it receives a view add 846a58c GEODE-5530: Add geode-core project to distributedTestRuntimeOnly (#2322) add 5e790c8 GEODE-5438: Add rule for running threads in tests add cd3f372 GEODE-3780 suspected member is never watched again after passing final check add bac62ee GEODE-5584: Converts all pipelines to Jinja2 templates (#2331) add 1cbd41e GEODE-5584: Fixes branch path. add 425debc GEODE-5584: Fixes pipeline prefix. add e3367bb GEODE-5584: Remove StressNew from main pipeline. add 4ae9798 GEODE-5584: Fixes image path on PR add 691573b GEODE-5584: make meta pipeline dependent on shared resources add a279aef GEODE-5584: dash removed from image path add bc77954 Revert "GEODE-5541: A create followed by a destroy of the same key will not invoke cache listener on remote nodes. (#2282)" add cfc30eb GEODE-5583: Use the ConcurrencyRule to run threads (#2330) add ac56a49 GEODE-5588: MemberStarterRule.withHttpService fails in some situations (#2336) add 152701b GEODE-3839: Warning when cache xml is used (#2271) add f0feda4 GEODE-5587: Randomize HTTP service working directory (#2333) add 5e73f06 GEODE-5248: Fixes in GatewayReceiverMBeanBridge add aadc520 GEODE-5530 Refactors shared test source between geode-web and geode-core. (#2325) add 29ef1880 GEODE-5530: Removes geode-web-test since it is empty. add 00fd7b2 GEODE-5530 move common pulse test framework into new sub-project add 0283a68 GEODE-5579: Add -PforceTest property to :test tasks (#2318) add 600fe23 Bump Windows job timeouts to 6h add 89a1fde GEODE-5530 create geode-assembly-test for better dependency resolution add 74c6166 Revert "GEODE-5530 create geode-assembly-test for better dependency resolution" add 2be72bd GEODE-5257: remove unnecessary assertion that introduced the flakiness. (#2265) add 6355672 GEODE-5531/GEODE-1507: Variable Substitution in GFSH (#2291) add 9000665 GEODE-5589: lastResultReceived set after msg sent (#2341) add f3f255a GEODE-5593 Update test dependencies add 6fa2d3e GEODE-5592: Release the lock in a finally block. (#2344) add d717fdb GEODE-5530 create geode-assembly-test for better dependency resolution (#2345) add 20e059a GEODE-5530: Cleanup javadoc warnings from test refactoring. add 976d332 GEODE-4384: fix test's argument captor type. (#2352) add 49e1c18 GEODE-5609: Extract validateRegionName and improve testing (#2353) add 2868c3c GEODE-5585: Check that threads have been run (#2332) add 1883e81 GEODE-5204: add xml-file support to import/export cluster-config command (#1986) add 291fae0 GEODE-5571: Added query to history before query execution add 8ae5808 GEODE-5505 Cache listener not invoked on a retried destroy() operation add 7fe2f18 GEODE-5612: Fix RVVExceptionB.writeReceived() (#2354) add 2e30373 GEODE-5613: Add winrm-cli utility to apachegeode-build image (#2355) add c1fd530 GEODE-5597: Adds more exhaustive verification of assembly content. (#2359) add 83ea1df GEODE-5620: Adds
[geode] 01/01: Limit max number of simultaneous runs to 5.
This is an automated email from the ASF dual-hosted git repository. upthewaterspout pushed a commit to branch concourse-staging in repository https://gitbox.apache.org/repos/asf/geode.git commit 16496e90c68d6b5eadffadb4adbbaf5eea502707 Author: Mark Hanson AuthorDate: Fri Jul 27 11:29:38 2018 -0700 Limit max number of simultaneous runs to 5. --- ci/pipelines/geode-build/jinja.template.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/pipelines/geode-build/jinja.template.yml b/ci/pipelines/geode-build/jinja.template.yml index 39acf0a..7350bc9 100644 --- a/ci/pipelines/geode-build/jinja.template.yml +++ b/ci/pipelines/geode-build/jinja.template.yml @@ -198,6 +198,7 @@ jobs: {% for test in tests if not test.name=="StressNew" %} - name: {{test.name}}Test public: true + max_in_flight: 5 plan: - do: {{ plan_resource_gets() |indent(4) }}
[geode] branch develop updated: GEODE-5597 Publish geode artifacts to maven repo on GCS (#2347)
This is an automated email from the ASF dual-hosted git repository. jbarrett 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 76af1dd GEODE-5597 Publish geode artifacts to maven repo on GCS (#2347) 76af1dd is described below commit 76af1dd2fc5dc35a80f61066645978bbb382f417 Author: FSOUTHERLAND <39743785+fsoutherl...@users.noreply.github.com> AuthorDate: Mon Aug 27 13:30:36 2018 -0700 GEODE-5597 Publish geode artifacts to maven repo on GCS (#2347) * Uses vanilla maven-publish Gradle plugin, instead of nexus (nexus is still used for release artifact publishing) * GCS credentials are inherited from the concourse worker Co-authored-by: Finn Southerland Co-authored-by: Jake Barrett --- build.gradle| 2 +- ci/pipelines/geode-build/deploy_pipeline.sh | 2 + ci/pipelines/geode-build/jinja.template.yml | 39 +- ci/scripts/publish.sh | 96 +++ geode-assembly/build.gradle | 47 +-- geode-core/build.gradle | 14 ++-- geode-junit/build.gradle| 2 +- geode-lucene/build.gradle | 2 +- geode-pulse/build.gradle| 10 +-- geode-web-api/build.gradle | 2 +- geode-web/build.gradle | 10 +-- gradle/publish.gradle | 117 +--- gradle/test.gradle | 8 ++ gradle/utilities.gradle | 3 + 14 files changed, 298 insertions(+), 56 deletions(-) diff --git a/build.gradle b/build.gradle index 674621d..52dae34 100755 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,7 @@ if (name == 'geode') { ext.scriptDir = 'gradle' } - +// utilities.gradle MUST be read before publish.gradle for reasons apply from: "${scriptDir}/utilities.gradle" apply from: "${scriptDir}/java.gradle" apply from: "${scriptDir}/dependency-resolution.gradle" diff --git a/ci/pipelines/geode-build/deploy_pipeline.sh b/ci/pipelines/geode-build/deploy_pipeline.sh index dd60acc..bd6709f 100755 --- a/ci/pipelines/geode-build/deploy_pipeline.sh +++ b/ci/pipelines/geode-build/deploy_pipeline.sh @@ -73,6 +73,8 @@ pushd ${SCRIPTDIR} 2>&1 > /dev/null # Template and output share a directory with this script, but variables are shared in the parent directory. python3 ../render.py jinja.template.yml ../shared/jinja.variables.yml generated-pipeline.yml || exit 1 + grep -n . generated-pipeline.yml + fly login -t ${TARGET} \ -n ${TEAM} \ -c https://concourse.apachegeode-ci.info \ diff --git a/ci/pipelines/geode-build/jinja.template.yml b/ci/pipelines/geode-build/jinja.template.yml index 39acf0a..c15fad0 100644 --- a/ci/pipelines/geode-build/jinja.template.yml +++ b/ci/pipelines/geode-build/jinja.template.yml @@ -47,6 +47,7 @@ groups: - {{test.name}}Test {% endfor -%} - UpdatePassingRef + - PublishArtifacts resources: - name: geode-build-artifact @@ -168,6 +169,7 @@ jobs: - put: geode-build-version params: file: results/number + - name: UpdatePassingRef public: true serial: true @@ -181,6 +183,7 @@ jobs: - get: geode-ci - get: docker-geode-build-image - task: updatepassingref +image: docker-geode-build-image config: platform: linux params: @@ -194,7 +197,41 @@ jobs: - name: geode-ci outputs: - name: results -image: docker-geode-build-image + +- name: PublishArtifacts + public: true + plan: + - get: geode +passed: +{% for test in tests if not test.name=="StressNew" -%} +- {{test.name}}Test +{% endfor %} +trigger: true + - get: geode-ci + - get: geode-build-version +params: + pre: build + - task: publish +config: + platform: linux + image_resource: +type: docker-image +source: + password: ((!docker-password)) + repository: gcr.io/apachegeode-ci/{{ pipeline_prefix() }}((!docker-image-name)) + tag: latest + username: ((!docker-username)) + params: +MAINTENANCE_VERSION: {{repository.branch}} +PUBLIC_BUCKET: ((!public-bucket)) +SERVICE_ACCOUNT: ((!concourse-gcp-account)) + run: +path: geode-ci/ci/scripts/publish.sh + inputs: + - name: geode + - name: geode-ci + - name: geode-build-version + {% for test in tests if not test.name=="StressNew" %} - name: {{test.name}}Test public: true diff --git a/ci/scripts/publish.sh b/ci/scripts/publish.sh new file mode 100755 index 000..6e0e91e --- /dev/null +++ b/ci/scripts/publish.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash + +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE
[geode] branch feature/GEODE-5624 updated: more refactoring.
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch feature/GEODE-5624 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-5624 by this push: new 13b6cfe more refactoring. 13b6cfe is described below commit 13b6cfe2cf2e1709a12d47e1dce7030af57e89f2 Author: eshu AuthorDate: Mon Aug 27 13:11:04 2018 -0700 more refactoring. --- .../geode/internal/cache/AfterCompletion.java | 105 + .../geode/internal/cache/BeforeCompletion.java | 64 .../internal/cache/SingleThreadJTAExecutor.java| 172 +++-- .../org/apache/geode/internal/cache/TXState.java | 11 +- .../geode/internal/cache/AfterCompletionTest.java | 131 .../geode/internal/cache/BeforeCompletionTest.java | 98 .../cache/SingleThreadJTAExecutorTest.java | 84 +++--- 7 files changed, 447 insertions(+), 218 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AfterCompletion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AfterCompletion.java new file mode 100644 index 000..02ef92c --- /dev/null +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AfterCompletion.java @@ -0,0 +1,105 @@ +/* + * 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; + +import java.util.function.BooleanSupplier; + +import org.apache.logging.log4j.Logger; + +import org.apache.geode.CancelCriterion; +import org.apache.geode.internal.logging.LogService; + +public class AfterCompletion { + private static final Logger logger = LogService.getLogger(); + + private boolean started; + private boolean finished; + private int status = -1; + private boolean cancelled; + private RuntimeException exception; + + public synchronized void doOp(TXState txState, CancelCriterion cancelCriterion) { +// there should be a transaction timeout that keeps this thread +// from sitting around forever if the client goes away +// The above was done by setting afterCompletionCancelled in txState +// during cleanup. When client departed, the transaction/JTA +// will be timed out and cleanup code will be executed. +waitForExecuteOrCancel(cancelCriterion); +started = true; +logger.debug("executing afterCompletion notification"); + +try { + if (cancelled) { +txState.doCleanup(); + } else { +txState.doAfterCompletion(status); + } +} catch (RuntimeException exception) { + this.exception = exception; +} finally { + logger.debug("afterCompletion notification completed"); + finished = true; + notifyAll(); +} + } + + private void waitForExecuteOrCancel(CancelCriterion cancelCriterion) { +waitForCondition(cancelCriterion, () -> { + return (status == -1 && !cancelled); +}); + } + + private synchronized void waitForCondition(CancelCriterion cancelCriterion, + BooleanSupplier condition) { +while (condition.getAsBoolean()) { + cancelCriterion.checkCancelInProgress(null); + try { +logger.debug("waiting for notification"); +wait(1000); + } catch (InterruptedException ignore) { +// eat the interrupt and check for exit conditions + } +} + } + + public synchronized void execute(CancelCriterion cancelCriterion, int status) { +this.status = status; +signalAndWaitForDoOp(cancelCriterion); + } + + private void signalAndWaitForDoOp(CancelCriterion cancelCriterion) { +notifyAll(); +waitUntilFinished(cancelCriterion); +if (exception != null) { + throw exception; +} + } + + private void waitUntilFinished(CancelCriterion cancelCriterion) { +waitForCondition(cancelCriterion, () -> { + return !finished; +}); + + } + + public synchronized void cancel(CancelCriterion cancelCriterion) { +cancelled = true; +signalAndWaitForDoOp(cancelCriterion); + } + + public synchronized boolean isStarted() { +return started; + } +} diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/BeforeCompletion.java
[geode] branch feature/GEODE-5596 deleted (was 47dc37b)
This is an automated email from the ASF dual-hosted git repository. bschuchardt pushed a change to branch feature/GEODE-5596 in repository https://gitbox.apache.org/repos/asf/geode.git. was 47dc37b Merge branch 'feature/GEODE-5596' of ssh://github.com/apache/geode into feature/GEODE-5596 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] 03/04: GEODE-5596 Client ends up with destroyed entry after invalidate()
This is an automated email from the ASF dual-hosted git repository. bschuchardt pushed a commit to branch feature/GEODE-5596 in repository https://gitbox.apache.org/repos/asf/geode.git commit 0bcb01992ce4e0d20e285541b0975965106efe10 Author: Bruce Schuchardt AuthorDate: Mon Aug 27 11:23:56 2018 -0700 GEODE-5596 Client ends up with destroyed entry after invalidate() Fixing failing tests. The behavior in clients has changed now - if there is no entry or a tombstone entry in the client and it does an invalidate() we now expect it to create an entry if concurrency-checks are enabled. I also changed the AttributesFactory javadoc for concurrency-checks-enabled because it was saying it is turned off by default but that is not the case. --- .../org/apache/geode/cache/AttributesFactory.java | 2 +- .../sockets/ClientServerMiscDUnitTestBase.java | 31 -- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/cache/AttributesFactory.java b/geode-core/src/main/java/org/apache/geode/cache/AttributesFactory.java index 2017cf2..93d9a99 100644 --- a/geode-core/src/main/java/org/apache/geode/cache/AttributesFactory.java +++ b/geode-core/src/main/java/org/apache/geode/cache/AttributesFactory.java @@ -193,7 +193,7 @@ import org.apache.geode.internal.i18n.LocalizedStrings; * others will only read. * {@link #setConcurrencyLevel} {@link RegionAttributes#getConcurrencyLevel} * - * ConcurrencyChecksEnabled [default: {@code false}] + * ConcurrencyChecksEnabled [default: {@code true}] * Enables a distributed versioning algorithm that detects concurrency conflicts in regions and * ensures that changes to an entry are not applied in a different order in other members. This can * cause operations to be conflated, so that some cache listeners may see an event while others do diff --git a/geode-dunit/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTestBase.java b/geode-dunit/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTestBase.java index 20d10ea..3bd42ca 100755 --- a/geode-dunit/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTestBase.java +++ b/geode-dunit/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTestBase.java @@ -16,6 +16,7 @@ package org.apache.geode.internal.cache.tier.sockets; import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS; import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT; +import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -45,6 +46,7 @@ import org.apache.geode.cache.CacheException; import org.apache.geode.cache.CacheWriterException; import org.apache.geode.cache.DataPolicy; import org.apache.geode.cache.EntryEvent; +import org.apache.geode.cache.InterestResultPolicy; import org.apache.geode.cache.PartitionAttributesFactory; import org.apache.geode.cache.Region; import org.apache.geode.cache.RegionAttributes; @@ -554,27 +556,16 @@ public class ClientServerMiscDUnitTestBase extends JUnit4CacheTestCase { Region region = static_cache.getRegion(REGION_NAME1); populateCache(); region.put("invalidationKey", "invalidationValue"); + region.localDestroy("invalidationKey"); -if (region.containsKey("invalidationKey")) { - fail("region still contains invalidationKey"); -} +assertThat(region.containsKey("invalidationKey")).isFalse(); + region.invalidate("invalidationKey"); -if (region.containsKey("invalidationKey")) { - fail( - "this test expects the entry is not created on invalidate() if not there before the operation"); -} +assertThat(region.containsKey("invalidationKey")).isTrue(); + Object value = region.get("invalidationKey"); -if (value != null) { - fail("this test expected a null response to get('invalidationKey')"); -} -if (!region.containsKeyOnServer("invalidationKey")) { - fail("expected an entry on the server after invalidation"); -} -// bug 43407 asserts that there should be an entry, but the product does not -// do this. This verifies that the product does not behave as asserted in that bug -if (region.containsKey("invalidationKey")) { - fail("expected no entry after invalidation when entry was not in client but was on server"); -} +assertThat(value).isNull(); +assertThat(region.containsKeyOnServer("invalidationKey")).isTrue(); } /** @@ -986,8 +977,8 @@ public class ClientServerMiscDUnitTestBase extends JUnit4CacheTestCase { assertNotNull(r1); Region r2 = cache.getRegion(Region.SEPARATOR + REGION_NAME2); assertNotNull(r2); -
[geode] branch feature/GEODE-5596 updated (996a0a9 -> 47dc37b)
This is an automated email from the ASF dual-hosted git repository. bschuchardt pushed a change to branch feature/GEODE-5596 in repository https://gitbox.apache.org/repos/asf/geode.git. from 996a0a9 GEODE-5596 Client ends up with destroyed entry after invalidate() add 89a1fde GEODE-5530 create geode-assembly-test for better dependency resolution add 74c6166 Revert "GEODE-5530 create geode-assembly-test for better dependency resolution" add 2be72bd GEODE-5257: remove unnecessary assertion that introduced the flakiness. (#2265) add 6355672 GEODE-5531/GEODE-1507: Variable Substitution in GFSH (#2291) add 9000665 GEODE-5589: lastResultReceived set after msg sent (#2341) add f3f255a GEODE-5593 Update test dependencies add 6fa2d3e GEODE-5592: Release the lock in a finally block. (#2344) add d717fdb GEODE-5530 create geode-assembly-test for better dependency resolution (#2345) add 20e059a GEODE-5530: Cleanup javadoc warnings from test refactoring. add 976d332 GEODE-4384: fix test's argument captor type. (#2352) add 49e1c18 GEODE-5609: Extract validateRegionName and improve testing (#2353) add 2868c3c GEODE-5585: Check that threads have been run (#2332) add 1883e81 GEODE-5204: add xml-file support to import/export cluster-config command (#1986) add 291fae0 GEODE-5571: Added query to history before query execution add 8ae5808 GEODE-5505 Cache listener not invoked on a retried destroy() operation add 7fe2f18 GEODE-5612: Fix RVVExceptionB.writeReceived() (#2354) add 2e30373 GEODE-5613: Add winrm-cli utility to apachegeode-build image (#2355) add c1fd530 GEODE-5597: Adds more exhaustive verification of assembly content. (#2359) add 83ea1df GEODE-5620: Adds project property to control test forking. (#2362) add 04ecdbb GEODE-5505 Cache listener not invoked on a retried destroy() operation add 5602d02 GEODE-5615: Capturing more data in the case of hangs or OOMEs add a77905d GEODE-5600: Add build property skipVersionFileRegeneration add 0e792a5 suggested feedback: pass revision as build parameter, only create version file when present (or file does not exist). Remove input based on .git/index. add b02d3f7 0 -> unknown, specify sourceRepository also, auto-format adjusts whitespace. add c404191 Some stuff add be57a3b Merge remote-tracking branch 'origin/develop' into geode-5602 add 793335e wip add 3598afd Add SOURCE_REPOSITORY to Jinja template for script calls, and git rev-parse for revision info. add 926a0d6 Correct whitespace issue in jinja template add 2fadf46 Correct directory for git command. add b5e80b5 Merge remote-tracking branch 'origin/develop' into geode-5600 add 98a0b7d Merge pull request #2349 from smgoller/geode-5600 add 114be74 GEODE-5547: cleanup RegionManagementDUnitTest add 6c2bc15 GEODE-5547: increase Await timeout add c435bc7 GEODE-5615: Removing gradle build scan plugin add 14a6a05 GEODE-3530: Deleting CliCommandTestBase add b6ba0fa GEODE-5613: Add winrm-cli for Windows CI support (#2364) add 966852d GEODE-5619: Change scanning for XSDRootElement to consider all packag… (#2361) add 9f13a5b GEODE-5610: CI Failure: DiskRegionJUnitTest testAssertionErrorIfMissingOplog (#2357) add c7ca13d GEODE-5460: Fixing a race condition in TestFunctionsDUNitTest add 6ee86d6 GEODE-5597 verify geode-dependency jar ClassPath (#2369) add 879b2cd GEODE-5597: Fixes formatting. add a1f747c GEODE-5440: when we need re-evaluate a entry in a index, we need to pass in the outer value key in the equiJoin. (#2338) add abb2702 GEODE-5630: fix use of Awaitility in BucketCreationCrashCompletesRegressionTest add 9be422c GEODE-5617: FIxing a race in AutoBalancerJUnitTest add cfa7ca5 GEODE-5627: ConcurrencyRule passes when not used. (#2370) add 39b2236 GEODE-5597 let AssemblyContentsIntegrationTest pass on windows add 583d141 GEODE-5562 Reading the values of LocalRegion.memoryThresholdReached and DistributedRegion.memoryThresholdReachedMembers must be atomic (#2320) add 9de289d GEODE-5632: import Assertions instead of AssertionsForClassTypes add b951146 GEODE-5142 new Thread Monitoring Mechanism add 123b8c4 GEODE-5614: rename DistributedTestRule as DistributedRule add 16d0f69 GEODE-5614: rename distributedTestRule field to distributedRule add f91c2df GEODE-5614: update RegionManagementDUnitTest usage of DistributedRule add e719331 GEODE-5629: Changing GMSEncryptJUnitTest to use ConcurrencyRule new 7e068cc GEODE-5596 Client ends up with destroyed entry after invalidate() new a113534 GEODE-5596 Client ends up with destroyed entry after invalidate() new 0bcb019 GEODE-5596 Client ends up with destroyed entry after invalidate() new 47dc37b Merge branch
[geode] 02/04: GEODE-5596 Client ends up with destroyed entry after invalidate()
This is an automated email from the ASF dual-hosted git repository. bschuchardt pushed a commit to branch feature/GEODE-5596 in repository https://gitbox.apache.org/repos/asf/geode.git commit a1135349e6cd1f934399346481ff62de806f33b3 Author: Bruce Schuchardt AuthorDate: Fri Aug 17 13:54:34 2018 -0700 GEODE-5596 Client ends up with destroyed entry after invalidate() Undoing a couple of unnecessary test changes. --- .../java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java index f9fc941..08a7edb 100644 --- a/geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java +++ b/geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java @@ -675,9 +675,7 @@ public class ClientServerCCEDUnitTest extends JUnit4CacheTestCase { private void unregisterInterest(VM vm) { vm.invoke(new SerializableRunnable("unregister interest in all keys") { public void run() { -// TestRegion.dumpBackingMap(); TestRegion.unregisterInterestRegex(".*"); -// TestRegion.dumpBackingMap(); } }); } @@ -886,8 +884,7 @@ public class ClientServerCCEDUnitTest extends JUnit4CacheTestCase { for (int i = 0; i < 10; i++) { TestRegion.invalidate("Object" + i, Integer.valueOf(i)); } -TestRegion.dumpBackingMap(); -// assertEquals(10, TestRegion.size()); +assertEquals(10, TestRegion.size()); return null; } });
[geode] 04/04: Merge branch 'feature/GEODE-5596' of ssh://github.com/apache/geode into feature/GEODE-5596
This is an automated email from the ASF dual-hosted git repository. bschuchardt pushed a commit to branch feature/GEODE-5596 in repository https://gitbox.apache.org/repos/asf/geode.git commit 47dc37b4b318b050c3e1356c947d10a8f582763d Merge: 0bcb019 996a0a9 Author: Bruce Schuchardt AuthorDate: Mon Aug 27 11:28:47 2018 -0700 Merge branch 'feature/GEODE-5596' of ssh://github.com/apache/geode into feature/GEODE-5596
[geode] 01/04: GEODE-5596 Client ends up with destroyed entry after invalidate()
This is an automated email from the ASF dual-hosted git repository. bschuchardt pushed a commit to branch feature/GEODE-5596 in repository https://gitbox.apache.org/repos/asf/geode.git commit 7e068cc11c2d5c58fbb64c9e7aef93e4e3cd4463 Author: Bruce Schuchardt AuthorDate: Fri Aug 17 10:51:44 2018 -0700 GEODE-5596 Client ends up with destroyed entry after invalidate() Modifying client cache behavior to create an Invalid entry when an application invokes invalid() and the entry is currently in Destroyed state on the client but not on servers. --- .../geode/cache30/ClientServerCCEDUnitTest.java| 73 +- .../geode/internal/cache/AbstractRegionMap.java| 7 +-- .../apache/geode/internal/cache/LocalRegion.java | 4 +- 3 files changed, 76 insertions(+), 8 deletions(-) diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java index 1878aa0..f9fc941 100644 --- a/geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java +++ b/geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java @@ -45,6 +45,7 @@ import org.apache.geode.cache.EntryEvent; import org.apache.geode.cache.ExpirationAction; import org.apache.geode.cache.ExpirationAttributes; import org.apache.geode.cache.InterestResultPolicy; +import org.apache.geode.cache.Operation; import org.apache.geode.cache.PartitionAttributesFactory; import org.apache.geode.cache.Region; import org.apache.geode.cache.Scope; @@ -63,7 +64,12 @@ import org.apache.geode.internal.AvailablePortHelper; import org.apache.geode.internal.cache.CachePerfStats; import org.apache.geode.internal.cache.DistributedRegion; import org.apache.geode.internal.cache.DistributedTombstoneOperation.TombstoneMessage; +import org.apache.geode.internal.cache.EntryEventImpl; +import org.apache.geode.internal.cache.EventID; +import org.apache.geode.internal.cache.KeyInfo; import org.apache.geode.internal.cache.LocalRegion; +import org.apache.geode.internal.cache.RegionMap; +import org.apache.geode.internal.cache.Token; import org.apache.geode.internal.cache.entries.AbstractRegionEntry; import org.apache.geode.internal.cache.ha.HARegionQueue; import org.apache.geode.internal.cache.partitioned.PRTombstoneMessage; @@ -567,6 +573,69 @@ public class ClientServerCCEDUnitTest extends JUnit4CacheTestCase { } @Test + public void testClientInvalidateAfterDestroyLeavesInvalidEntryRR() throws Exception { +clientInvalidateAfterDestroyLeavesInvalidEntryTest(getUniqueName(), true); + } + + @Test + public void testClientInvalidateAfterDestroyLeavesInvalidEntryPR() throws Exception { +clientInvalidateAfterDestroyLeavesInvalidEntryTest(getUniqueName(), false); + } + + private void clientInvalidateAfterDestroyLeavesInvalidEntryTest(String uniqueName, + boolean useReplicateRegion) { +Host host = Host.getHost(0); +VM serverVM = host.getVM(0); +VM clientVM = host.getVM(1); +final String name = uniqueName + "Region"; + + +int port = createServerRegion(serverVM, name, useReplicateRegion); + +createClientRegion(clientVM, name, port, true, ClientRegionShortcut.CACHING_PROXY, false); +final String key = "Object0"; + +// use the client cache to create and destroy an entry +clientVM.invoke(() -> { + TestRegion.put(key, "some value"); // v1 + TestRegion.destroy(key); // v2 + RegionMap map = TestRegion.getRegionMap(); + AbstractRegionEntry regionEntry = (AbstractRegionEntry) map.getEntry(key); + assertEquals(Token.TOMBSTONE, regionEntry.getValueAsToken()); +}); + +// use the server cache to recreate the entry, but don't let the client cache know about it +serverVM.invoke(() -> { + TestRegion.put(key, "new value"); // v3 - not known by client cache +}); + +// now invalidate the entry in the client cache and show that it holds an INVALID entry +clientVM.invoke(() -> { + RegionMap map = TestRegion.getRegionMap(); + AbstractRegionEntry regionEntry = (AbstractRegionEntry) map.getEntry(key); + + EntryEventImpl invalidateEvent = new EntryEventImpl(); + invalidateEvent.setRegion(TestRegion); + invalidateEvent.setKeyInfo(new KeyInfo(key, Token.INVALID, null)); + invalidateEvent.setOperation(Operation.INVALIDATE); + invalidateEvent.setEventId(new EventID(TestRegion.getCache().getDistributedSystem())); + + // invoke invalidate() with forceNewEntry=true to have it create an INVALID entry + map.invalidate(invalidateEvent, true, true, false); + + assertEquals(Token.INVALID, regionEntry.getValueAsToken()); + System.out.println("entry=" + regionEntry); + assertEquals(4, regionEntry.getVersionStamp().getEntryVersion()); +}); + +serverVM.invoke(() -> { +
[geode] branch develop updated: GEODE-5620: Adds project property to control test forking
This is an automated email from the ASF dual-hosted git repository. bschuchardt 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 0cbf8e5 GEODE-5620: Adds project property to control test forking 0cbf8e5 is described below commit 0cbf8e5e5221b9d397edbca26a03995c8ed20a68 Author: Bruce Schuchardt AuthorDate: Mon Aug 27 11:18:22 2018 -0700 GEODE-5620: Adds project property to control test forking Fixing testMaxParalleForks property handling. The code was using the character code for the number assigned to the property. It needed to parse the value to turn it into the requested number. --- gradle/test.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/test.gradle b/gradle/test.gradle index f3132e7..504719c 100644 --- a/gradle/test.gradle +++ b/gradle/test.gradle @@ -87,7 +87,7 @@ subprojects { TestPropertiesWriter.writeTestProperties(buildDir, name) } if (project.hasProperty('testMaxParallelForks')) { - maxParallelForks = project.testMaxParallelForks + maxParallelForks = Integer.parseUnsignedInt(project.testMaxParallelForks) } else { maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 }
[geode] branch develop updated: GEODE-5630: fixup usage of Awaitility
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 45138b4 GEODE-5630: fixup usage of Awaitility 45138b4 is described below commit 45138b4861ff882006000c953a823b4ecc4a5fdd Author: Kirk Lund AuthorDate: Fri Aug 24 15:40:56 2018 -0700 GEODE-5630: fixup usage of Awaitility --- .../test/junit/rules/MySqlConnectionRule.java | 5 - .../junit/rules/SqlDatabaseConnectionRule.java | 4 +++- .../internal/AutoConnectionSourceDUnitTest.java| 3 ++- .../query/dunit/QueryIndexUsingXMLDUnitTest.java | 3 +-- .../EntriesDoNotExpireDuringGiiRegressionTest.java | 2 +- .../ParallelAsyncEventListenerDistributedTest.java | 2 +- .../management/JMXMBeanReconnectDUnitTest.java | 10 ++--- .../internal/pulse/TestClientIdsDUnitTest.java | 8 +--- .../CacheClientNotifierIntegrationTest.java| 24 +++--- ...pClientExecutorSubmitTaskWithExceptionTest.java | 9 .../cache/query/internal/QueryMonitorTest.java | 5 - ...ientStatisticsPublicationSecurityDUnitTest.java | 14 + .../tier/sockets/ClientServerMiscBCDUnitTest.java | 15 ++ .../geode/cache/lucene/ExpirationDUnitTest.java| 9 +--- ...eneIndexCreationPersistenceIntegrationTest.java | 13 .../LuceneSearchWithRollingUpgradeDUnit.java | 15 +- 16 files changed, 51 insertions(+), 90 deletions(-) diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/test/junit/rules/MySqlConnectionRule.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/test/junit/rules/MySqlConnectionRule.java index 4998cbf..e8dadda 100644 --- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/test/junit/rules/MySqlConnectionRule.java +++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/test/junit/rules/MySqlConnectionRule.java @@ -14,6 +14,8 @@ */ package org.apache.geode.test.junit.rules; +import static org.assertj.core.api.Assertions.assertThat; + import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; @@ -37,7 +39,8 @@ public class MySqlConnectionRule extends SqlDatabaseConnectionRule { @Override public Connection getConnection() throws SQLException { Awaitility.await().ignoreExceptions().atMost(10, TimeUnit.SECONDS) -.untilAsserted(() -> DriverManager.getConnection(getCreateDbConnectionUrl())); +.untilAsserted( +() -> assertThat(DriverManager.getConnection(getCreateDbConnectionUrl())).isNotNull()); String dbName = getDbName(); if (dbName != null) { Connection connection = DriverManager.getConnection(getCreateDbConnectionUrl()); diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/test/junit/rules/SqlDatabaseConnectionRule.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/test/junit/rules/SqlDatabaseConnectionRule.java index 1dcd255..aab0b08 100644 --- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/test/junit/rules/SqlDatabaseConnectionRule.java +++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/test/junit/rules/SqlDatabaseConnectionRule.java @@ -14,6 +14,8 @@ */ package org.apache.geode.test.junit.rules; +import static org.assertj.core.api.Assertions.assertThat; + import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; @@ -64,7 +66,7 @@ public abstract class SqlDatabaseConnectionRule extends ExternalResource public Connection getConnection() throws SQLException { String connectionUrl = getConnectionUrl(); Awaitility.await().ignoreExceptions().atMost(10, TimeUnit.SECONDS) -.untilAsserted(() -> DriverManager.getConnection(connectionUrl)); +.untilAsserted(() -> assertThat(DriverManager.getConnection(connectionUrl)).isNotNull()); Connection connection = DriverManager.getConnection(connectionUrl); return connection; } diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java index 1ddb8ed..8e53ad7 100644 --- a/geode-core/src/distributedTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java +++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java @@ -17,6 +17,7 @@ package org.apache.geode.cache.client.internal; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.geode.test.dunit.NetworkUtils.getServerHostName; +import static org.assertj.core.api.Assertions.assertThatCode; import static org.junit.Assert.assertEquals;
[geode] branch develop updated: GEODE-5631: failedBatchRemovalMessageKeys not used after GII (#2375)
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.git The following commit(s) were added to refs/heads/develop by this push: new 85953f0 GEODE-5631: failedBatchRemovalMessageKeys not used after GII (#2375) 85953f0 is described below commit 85953f085b13815405cb9bf3c5b1bca77c3c9a5e Author: Nabarun Nag AuthorDate: Mon Aug 27 09:37:45 2018 -0700 GEODE-5631: failedBatchRemovalMessageKeys not used after GII (#2375) * After GII a flag is set to indicate that failedBatchRemovalMessageKeys has been processed * If this flag is set, no more entries will be put into failedBatchRemovalMessageKeys. --- .../internal/cache/AbstractBucketRegionQueue.java | 12 +++ .../geode/internal/cache/BucketRegionQueue.java| 1 + .../wan/parallel/ParallelQueueRemovalMessage.java | 10 ++--- .../ParallelQueueRemovalMessageJUnitTest.java | 24 ++ 4 files changed, 44 insertions(+), 3 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java index fe95659..fc06ceb 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java @@ -501,6 +501,18 @@ public abstract class AbstractBucketRegionQueue extends BucketRegion { failedBatchRemovalMessageKeys.add(key); } + public boolean isFailedBatchRemovalMessageKeysClearedFlag() { +return failedBatchRemovalMessageKeysClearedFlag; + } + + public void setFailedBatchRemovalMessageKeysClearedFlag( + boolean failedBatchRemovalMessageKeysClearedFlag) { +this.failedBatchRemovalMessageKeysClearedFlag = failedBatchRemovalMessageKeysClearedFlag; + } + + private boolean failedBatchRemovalMessageKeysClearedFlag = false; + + public ConcurrentHashSet getFailedBatchRemovalMessageKeys() { return this.failedBatchRemovalMessageKeys; } diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegionQueue.java b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegionQueue.java index 314d0cc..712c0b8 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegionQueue.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegionQueue.java @@ -188,6 +188,7 @@ public class BucketRegionQueue extends AbstractBucketRegionQueue { } } } +setFailedBatchRemovalMessageKeysClearedFlag(true); } @Override diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java index 6d47266..401094d 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java @@ -187,7 +187,7 @@ public class ParallelQueueRemovalMessage extends PooledDistributionMessage { } } - private void destroyKeyFromBucketQueue(AbstractBucketRegionQueue brq, Object key, + void destroyKeyFromBucketQueue(AbstractBucketRegionQueue brq, Object key, PartitionedRegion prQ) { final boolean isDebugEnabled = logger.isDebugEnabled(); try { @@ -207,8 +207,12 @@ public class ParallelQueueRemovalMessage extends PooledDistributionMessage { } // add the key to failedBatchRemovalMessageQueue. // This is to handle the last scenario in #49196 - brq.addToFailedBatchRemovalMessageKeys(key); - + // But if GII is already completed and FailedBatchRemovalMessageKeys + // are already cleared then no keys should be added to it as they will + // never be cleared and increase the memory footprint. + if (!brq.isFailedBatchRemovalMessageKeysClearedFlag()) { +brq.addToFailedBatchRemovalMessageKeys(key); + } } catch (ForceReattemptException fe) { if (isDebugEnabled) { logger.debug( diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessageJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessageJUnitTest.java index 7633044..6a5b495 100644 --- a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessageJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessageJUnitTest.java @@ -17,10 +17,14 @@ package org.apache.geode.internal.cache.wan.parallel; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse;
[geode] branch develop updated: GEODE-5623: Use Awaitility in StopLcoatorCommandDUnitTest (#2379)
This is an automated email from the ASF dual-hosted git repository. upthewaterspout 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 a383053 GEODE-5623: Use Awaitility in StopLcoatorCommandDUnitTest (#2379) a383053 is described below commit a3830536834fa70dbf00bd70ce381c94bf264307 Author: Dan Smith AuthorDate: Mon Aug 27 09:34:11 2018 -0700 GEODE-5623: Use Awaitility in StopLcoatorCommandDUnitTest (#2379) Apparently members are not immmediately visible to stop after gfsh start locator. Changing the test to use awaitility to wait until the members can be stopped. --- .../cli/commands/StopLocatorCommandDUnitTest.java | 29 +- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StopLocatorCommandDUnitTest.java b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StopLocatorCommandDUnitTest.java index 5903796..28c2829 100644 --- a/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StopLocatorCommandDUnitTest.java +++ b/geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/StopLocatorCommandDUnitTest.java @@ -15,6 +15,7 @@ package org.apache.geode.management.internal.cli.commands; import static org.apache.geode.distributed.internal.DistributionConfig.GEMFIRE_PREFIX; +import static org.apache.geode.management.MXBeanAwaitility.await; import static org.apache.geode.management.cli.Result.Status.ERROR; import static org.apache.geode.management.cli.Result.Status.OK; import static org.apache.geode.management.internal.cli.i18n.CliStrings.GROUP; @@ -34,6 +35,7 @@ import java.io.File; import java.io.IOException; import java.util.Properties; import java.util.Set; +import java.util.concurrent.TimeUnit; import javax.management.MBeanServerConnection; import javax.management.ObjectName; @@ -154,27 +156,39 @@ public class StopLocatorCommandDUnitTest { .addOption(STOP_LOCATOR__MEMBER, memberName) .getCommandString(); -CommandResult result = gfsh.executeCommand(command); -assertThat(result.getStatus()).isEqualTo(OK); +// The new locator is not immediately available to be stopped because its mbean +// has to be propagated to the existing locator that gfsh is connected to. Wait +// for the stop to work +waitForCommandToSucceed(command); gfsh.executeAndAssertThat("list members").doesNotContainOutput(memberName); } @Test public void testWithMemberID() { int port = jmxPort; // this assignment is needed to pass a local var into the invocation below + final String memberID = locator.invoke(() -> getMemberId(port)); final String command = new CommandStringBuilder(STOP_LOCATOR) .addOption(STOP_LOCATOR__MEMBER, memberID) .getCommandString(); -CommandResult result = gfsh.executeCommand(command); +// The new locator is not immediately available to be stopped because its mbean +// has to be propagated to the existing locator that gfsh is connected to. Wait +// for the stop to work +waitForCommandToSucceed(command); -assertThat(result.getStatus()).isEqualTo(OK); gfsh.executeAndAssertThat("list members").doesNotContainOutput(memberName); } + private void waitForCommandToSucceed(String command) { +await().atMost(5, TimeUnit.MINUTES).untilAsserted(() -> { + CommandResult result = gfsh.executeCommand(command); + assertThat(result.getStatus()).isEqualTo(OK); +}); + } + @Test public void testWithDirOnline() throws IOException { final String command = new CommandStringBuilder(STOP_LOCATOR) @@ -246,9 +260,12 @@ public class StopLocatorCommandDUnitTest { final MBeanServerConnection connection = conn.getMBeanServerConnection(); assertThat(connection).isInstanceOf(MBeanServerConnection.class); - final Set objectNames = connection.queryNames(objectNamePattern, query); - assertThat(objectNames).isNotNull().isNotEmpty().hasSize(1); + await().untilAsserted(() -> { +final Set objectNames = connection.queryNames(objectNamePattern, query); +assertThat(objectNames).isNotNull().isNotEmpty().hasSize(1); + }); + final Set objectNames = connection.queryNames(objectNamePattern, query); final ObjectName objectName = objectNames.iterator().next(); final Object memberId = connection.getAttribute(objectName, "Id");
[geode-native] branch develop updated: Revert "GEODE-5634: Xunit modules upgraded to latest"
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 0b2140d Revert "GEODE-5634: Xunit modules upgraded to latest" 0b2140d is described below commit 0b2140d97c0d93967558f33192e903e7c105034c Author: Ernest Burghardt AuthorDate: Mon Aug 27 09:19:23 2018 -0600 Revert "GEODE-5634: Xunit modules upgraded to latest" This reverts commit 24d235b92e85313f299a355aa9c6ba777453. --- clicache/integration-test2/packages.config | 18 +- clicache/test2/packages.config | 20 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/clicache/integration-test2/packages.config b/clicache/integration-test2/packages.config index 7b91adb..b020c2f 100644 --- a/clicache/integration-test2/packages.config +++ b/clicache/integration-test2/packages.config @@ -17,13 +17,13 @@ --> - - - - - - - - - + + + + + + + + + diff --git a/clicache/test2/packages.config b/clicache/test2/packages.config index 7e8ca2f..428e078 100644 --- a/clicache/test2/packages.config +++ b/clicache/test2/packages.config @@ -1,13 +1,13 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file