Source:
public void alterReplicateRegionWithParallelGatewaySenderShouldFailAndDoNotPersistChangesIntoTheClusterConfigurationService() { addIgnoredException(GatewaySenderConfigurationException.class); addIgnoredException("could not get remote locator information"); String regionName = testName.getMethodName(); String gatewaySenderId = testName.getMethodName() + "_parallelGatewaySender"; gfsh.executeAndAssertThat( "create gateway-sender --parallel=true --enable-persistence=false --remote-distributed-system-id=2 --id=" + gatewaySenderId) .statusIsSuccess().doesNotContainOutput("Did not complete waiting"); gfsh.executeAndAssertThat("create region --type=REPLICATE --name=" + regionName) .statusIsSuccess(); locator.waitUntilRegionIsReadyOnExactlyThisManyServers(SEPARATOR + regionName, 1); gfsh.executeAndAssertThat( "alter region --name=" + regionName + " --gateway-sender-id=" + gatewaySenderId) .statusIsError().containsOutput("server-1", "Parallel Gateway Sender " + gatewaySenderId + " can not be used with replicated region " + SEPARATOR + regionName); locator.invoke(() -> { InternalLocator internalLocator = ClusterStartupRule.getLocator(); assertThat(internalLocator).isNotNull(); CacheConfig config = internalLocator.getConfigurationPersistenceService().getCacheConfig("cluster"); RegionConfig regionConfig = find(config.getRegions(), regionName); assertThat(regionConfig).isNotNull(); assertThat(regionConfig.getRegionAttributes()).isNotNull(); assertThat(regionConfig.getRegionAttributes().getGatewaySenderIds()).isNull(); }); }

Target:
public void alterReplicateRegionWithParallelGatewaySenderShouldFailAndDoNotPersistChangesIntoTheClusterConfigurationService() { addIgnoredException(GatewaySenderConfigurationException.class); addIgnoredException("could not get remote locator information"); String regionName = testName.getMethodName(); String gatewaySenderId = testName.getMethodName() + "_parallelGatewaySender"; CommandStringBuilder createSenderBuilder = new CommandStringBuilder("create gateway-sender") .addOption("id", gatewaySenderId) .addOption("parallel", "true") .addOption("enable-persistence", "false") .addOption("remote-distributed-system-id", "2"); gfsh.executeAndAssertThat(createSenderBuilder.getCommandString()) .statusIsSuccess().doesNotContainOutput("Did not complete waiting"); CommandStringBuilder createRegionBuilder = new CommandStringBuilder("create region") .addOption("name", regionName) .addOption("type", RegionShortcut.REPLICATE.toString()); gfsh.executeAndAssertThat(createRegionBuilder.getCommandString()).statusIsSuccess(); locator.waitUntilRegionIsReadyOnExactlyThisManyServers(SEPARATOR + regionName, 1); CommandStringBuilder alterRegionBuilder = new CommandStringBuilder("alter region") .addOption("name", regionName) .addOption("gateway-sender-id", gatewaySenderId); gfsh.executeAndAssertThat(alterRegionBuilder.getCommandString()) .statusIsError() .containsOutput("server-1", "Parallel Gateway Sender " + gatewaySenderId + " can not be used with replicated region " + SEPARATOR + regionName); locator.invoke(() -> { InternalLocator internalLocator = ClusterStartupRule.getLocator(); assertThat(internalLocator).isNotNull(); CacheConfig config = internalLocator.getConfigurationPersistenceService().getCacheConfig("cluster"); RegionConfig regionConfig = find(config.getRegions(), regionName); assertThat(regionConfig).isNotNull(); assertThat(regionConfig.getRegionAttributes()).isNotNull(); assertThat(regionConfig.getRegionAttributes().getGatewaySenderIds()).isNull(); }); }