You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/03/02 18:41:57 UTC
[12/16] ambari git commit: AMBARI-20262 - Startup Annotation Scanning
Takes Too Long (part2) (jonathanhurley)
AMBARI-20262 - Startup Annotation Scanning Takes Too Long (part2) (jonathanhurley)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f8fe522b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f8fe522b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f8fe522b
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: f8fe522b95166f18b93135a7b8cd7ff24d1f0fd9
Parents: 843c5f9
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Thu Mar 2 11:49:21 2017 -0500
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Thu Mar 2 11:54:40 2017 -0500
----------------------------------------------------------------------
.../funtest/server/orm/InMemoryDefaultTestModule.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f8fe522b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
----------------------------------------------------------------------
diff --git a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
index ed78ded..2932f93 100644
--- a/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
+++ b/ambari-funtest/src/test/java/org/apache/ambari/funtest/server/orm/InMemoryDefaultTestModule.java
@@ -26,7 +26,6 @@ import java.util.concurrent.atomic.AtomicReference;
import org.apache.ambari.server.configuration.Configuration;
import org.apache.ambari.server.controller.ControllerModule;
-import org.springframework.beans.factory.config.BeanDefinition;
import com.google.inject.AbstractModule;
@@ -41,17 +40,17 @@ public class InMemoryDefaultTestModule extends AbstractModule {
private static class BeanDefinitionsCachingTestControllerModule extends ControllerModule {
// Access should be synchronised to allow concurrent test runs.
- private static final AtomicReference<Set<BeanDefinition>> foundBeanDefinitions
- = new AtomicReference<Set<BeanDefinition>>(null);
+ private static final AtomicReference<Set<Class<?>>> matchedAnnotationClasses = new AtomicReference<>(
+ null);
public BeanDefinitionsCachingTestControllerModule(Properties properties) throws Exception {
super(properties);
}
@Override
- protected Set<BeanDefinition> bindByAnnotation(Set<BeanDefinition> beanDefinitions) {
- Set<BeanDefinition> newBeanDefinitions = super.bindByAnnotation(foundBeanDefinitions.get());
- foundBeanDefinitions.compareAndSet(null, Collections.unmodifiableSet(newBeanDefinitions));
+ protected Set<Class<?>> bindByAnnotation(Set<Class<?>> matchedClasses) {
+ Set<Class<?>> newMatchedClasses = super.bindByAnnotation(matchedAnnotationClasses.get());
+ matchedAnnotationClasses.compareAndSet(null, Collections.unmodifiableSet(newMatchedClasses));
return null;
}
}