SGF-849 - Fix test failures.

This commit is contained in:
John Blum
2019-05-28 16:49:54 -07:00
parent 07f5d03abf
commit 21c6882909
6 changed files with 24 additions and 19 deletions

View File

@@ -67,7 +67,6 @@ public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnota
public static final Integer DEFAULT_PORT = 0;
public static final String DEFAULT_HOST = "localhost";
@SuppressWarnings("all")
@Autowired(required = false)
private AbstractCacheConfiguration cacheConfiguration;
@@ -165,7 +164,9 @@ public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnota
}
protected BeanDefinitionHolder newBeanDefinitionHolder(BeanDefinitionBuilder builder) {
return new BeanDefinitionHolder(builder.getBeanDefinition(), generateBeanName());
return new BeanDefinitionHolder(builder.getBeanDefinition(),
generateBeanName(builder.getRawBeanDefinition().getBeanClass().getSimpleName()));
}
protected String generateBeanName() {
@@ -248,7 +249,7 @@ public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnota
}
protected static class ClientGemFirePropertiesConfigurer extends AbstractGemFirePropertiesConfigurer
implements ClientCacheConfigurer {
implements ClientCacheConfigurer {
protected ClientGemFirePropertiesConfigurer(Properties gemfireProperties) {
super(gemfireProperties);
@@ -261,7 +262,7 @@ public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnota
}
protected static class PeerGemFirePropertiesConfigurer extends AbstractGemFirePropertiesConfigurer
implements PeerCacheConfigurer {
implements PeerCacheConfigurer {
protected PeerGemFirePropertiesConfigurer(Properties gemfireProperties) {
super(gemfireProperties);

View File

@@ -14,7 +14,6 @@
* limitations under the License.
*
*/
package org.springframework.data.gemfire.config.annotation;
import static org.apache.geode.security.ResourcePermission.Operation;
@@ -26,10 +25,12 @@ import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import org.apache.geode.security.AuthenticationFailedException;
import org.apache.geode.security.ResourcePermission;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.apache.geode.security.AuthenticationFailedException;
import org.apache.geode.security.ResourcePermission;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.test.context.ActiveProfiles;
@@ -92,6 +93,7 @@ public class ApacheGeodeSecurityManagerSecurityIntegrationTests extends Abstract
}
}
@SuppressWarnings("unused")
public static class TestGeodeSecurityManager implements org.apache.geode.security.SecurityManager {
private final GeodeSecurityRepository securityRepository;

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*
*/
package org.springframework.data.gemfire.config.annotation;
import java.io.IOException;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.test.context.ActiveProfiles;
@@ -49,6 +49,6 @@ public class ApacheShiroIniSecurityIntegrationTests extends AbstractGeodeSecurit
@Configuration
@EnableSecurity(shiroIniResourcePath = "shiro.ini")
@Profile(SHIRO_INI_CONFIGURATION_PROFILE)
public static class ApacheShiroIniConfiguration {
}
public static class ApacheShiroIniConfiguration { }
}

View File

@@ -14,15 +14,16 @@
* limitations under the License.
*
*/
package org.springframework.data.gemfire.config.annotation;
import java.io.IOException;
import org.apache.geode.internal.security.shiro.GeodePermissionResolver;
import org.apache.shiro.realm.text.PropertiesRealm;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.apache.geode.internal.security.shiro.GeodePermissionResolver;
import org.apache.shiro.realm.text.PropertiesRealm;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

View File

@@ -13,23 +13,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.gemfire.config.annotation;
import static org.assertj.core.api.Assertions.assertThat;
import javax.annotation.Resource;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.apache.geode.cache.CacheLoader;
import org.apache.geode.cache.CacheLoaderException;
import org.apache.geode.cache.GemFireCache;
import org.apache.geode.cache.LoaderHelper;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.client.ClientRegionShortcut;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;

View File

@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.gemfire.config.annotation;
import static org.assertj.core.api.Assertions.assertThat;
@@ -23,6 +22,7 @@ import java.util.Properties;
import org.junit.After;
import org.junit.Test;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.env.MutablePropertySources;