Add assertion asserting the 'spring.data.gemfire.cache.client.region.shortcut' property is still set to 'LOCAL' even when 'strictMatch' is 'true' and no cluster is available.

This commit is contained in:
John Blum
2021-01-20 14:44:51 -08:00
parent df2dcfbeff
commit d091be0498
2 changed files with 10 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import org.junit.AfterClass;
import org.junit.Test;
import org.apache.geode.cache.client.ClientCache;
import org.apache.geode.cache.client.ClientRegionShortcut;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.core.NestedExceptionUtils;
@@ -88,6 +89,10 @@ public class PropertyConfiguredStrictMatchingClusterNotAvailableConfigurationInt
throw expected;
}
finally {
assertThat(System.getProperty(ClusterAwareConfiguration.SPRING_DATA_GEMFIRE_CACHE_CLIENT_REGION_SHORTCUT_PROPERTY))
.isEqualTo(ClientRegionShortcut.LOCAL.name());
}
}
@ClientCacheApplication

View File

@@ -21,6 +21,7 @@ import org.junit.AfterClass;
import org.junit.Test;
import org.apache.geode.cache.client.ClientCache;
import org.apache.geode.cache.client.ClientRegionShortcut;
import org.springframework.core.NestedExceptionUtils;
import org.springframework.data.gemfire.config.annotation.ClientCacheApplication;
@@ -69,6 +70,10 @@ public class StrictMatchingClusterNotAvailableConfigurationIntegrationTests
throw expected;
}
finally {
assertThat(System.getProperty(ClusterAwareConfiguration.SPRING_DATA_GEMFIRE_CACHE_CLIENT_REGION_SHORTCUT_PROPERTY))
.isEqualTo(ClientRegionShortcut.LOCAL.name());
}
}
@ClientCacheApplication