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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user