Fixed message in assertion and overrode the assertInitialized method of LazyWiringDeclarableSupport in the inner, static UserDataStoreCacheLoader test class to properly assert that the Spring defined DataSource dependency was properly configured.

This commit is contained in:
John Blum
2014-06-24 19:07:55 -07:00
parent 1920ce4ba1
commit ff11bd384d

View File

@@ -154,7 +154,7 @@ public class SpringContextBootstrappingInitializerIntegrationTest {
.create();
assertNotNull("The GemFire Cache was not properly created or initialized!", gemfireCache);
assertFalse("The GemFire Cache is close!", gemfireCache.isClosed());
assertFalse("The GemFire Cache is closed!", gemfireCache.isClosed());
Set<Region<?, ?>> rootRegions = gemfireCache.rootRegions();
@@ -258,6 +258,14 @@ public class SpringContextBootstrappingInitializerIntegrationTest {
getClass().getName()));
}
@Override
protected void assertInitialized() {
super.assertInitialized();
Assert.state(userDataSource != null, String.format(
"The 'User' Data Source was not properly configured and initialized for use in (%1$s!)",
getClass().getName()));
}
protected DataSource getDataSource() {
return userDataSource;
}