Cache reflection operations in AbstractSchemaAwareTest 32/75332/9
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 20 Aug 2018 16:11:28 +0000 (18:11 +0200)
committerStephen Kitt <skitt@redhat.com>
Wed, 22 Aug 2018 07:44:10 +0000 (07:44 +0000)
The design of AbstractSchemaAwareTest requires reflection-based
loading of SchemaContext for each test case, which is slow.

Instantiate weak caches to speed up tests which are co-located
on the same class loader.

Change-Id: I1a79d7e99f6efcccab37445f3de25a74cb6f02b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 files changed:
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/Bug1125RegressionTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/Bug1333DataChangeListenerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/Bug1418AugmentationTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/Bug2562DeserializedUnkeyedListTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/Bug3090MultiKeyList.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/DataTreeChangeListenerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ForwardedNotificationAdapterTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/ListInsertionDataChangeListenerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/AbstractSchemaAwareTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/ConstantSchemaAbstractDataBrokerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/SchemaContextSingleton.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/md/sal/binding/data/WildcardedDataChangeListenerTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/DeleteNestedAugmentationListenParentTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/WriteParentListenAugmentTest.java

index 1348af1..cf278bd 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.md.sal.binding.impl.test;
 
 import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.TOP_FOO_KEY;
 package org.opendaylight.controller.md.sal.binding.impl.test;
 
 import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.TOP_FOO_KEY;
@@ -13,6 +12,7 @@ import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUti
 import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList;
 
 import com.google.common.collect.ImmutableSet;
 import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList;
 
 import com.google.common.collect.ImmutableSet;
+import java.util.Set;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
@@ -46,7 +46,7 @@ public class Bug1125RegressionTest extends AbstractDataTreeChangeListenerTest {
                     TreeComplexUsesAugment.class);
 
     @Override
                     TreeComplexUsesAugment.class);
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
index 90156f1..1665bef 100644 (file)
@@ -17,6 +17,7 @@ import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUti
 import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList;
 
 import com.google.common.collect.ImmutableSet;
 import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList;
 
 import com.google.common.collect.ImmutableSet;
+import java.util.Set;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
@@ -44,7 +45,7 @@ public class Bug1333DataChangeListenerTest extends AbstractDataTreeChangeListene
             TOP_PATH.child(TopLevelList.class).augmentation(TreeComplexUsesAugment.class);
 
     @Override
             TOP_PATH.child(TopLevelList.class).augmentation(TreeComplexUsesAugment.class);
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
index 7c114e7..f106742 100644 (file)
@@ -17,6 +17,7 @@ import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUti
 import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList;
 
 import com.google.common.collect.ImmutableSet;
 import static org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList;
 
 import com.google.common.collect.ImmutableSet;
+import java.util.Set;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
@@ -43,7 +44,7 @@ public class Bug1418AugmentationTest extends AbstractDataTreeChangeListenerTest
             new ListViaUsesKey("list key modified");
 
     @Override
             new ListViaUsesKey("list key modified");
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class),
                 BindingReflections.getModuleInfo(TreeLeafOnlyUsesAugment.class));
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class),
                 BindingReflections.getModuleInfo(TreeLeafOnlyUsesAugment.class));
index 70b4307..bb3fbc2 100644 (file)
@@ -5,11 +5,11 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.md.sal.binding.impl.test;
 
 import com.google.common.collect.ImmutableSet;
 import java.util.Arrays;
 package org.opendaylight.controller.md.sal.binding.impl.test;
 
 import com.google.common.collect.ImmutableSet;
 import java.util.Arrays;
+import java.util.Set;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataTreeChangeListenerTest;
@@ -29,7 +29,7 @@ public class Bug2562DeserializedUnkeyedListTest extends AbstractDataTreeChangeLi
     private static final InstanceIdentifier<Root> ROOT_PATH = InstanceIdentifier.create(Root.class);
 
     @Override
     private static final InstanceIdentifier<Root> ROOT_PATH = InstanceIdentifier.create(Root.class);
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Root.class));
     }
 
         return ImmutableSet.of(BindingReflections.getModuleInfo(Root.class));
     }
 
index a150d24..bf6f1b2 100644 (file)
@@ -32,7 +32,7 @@ public class Bug3090MultiKeyList extends AbstractDataTreeChangeListenerTest {
     private static final InstanceIdentifier<Root> ROOT_PATH = InstanceIdentifier.create(Root.class);
 
     @Override
     private static final InstanceIdentifier<Root> ROOT_PATH = InstanceIdentifier.create(Root.class);
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Root.class));
     }
 
         return ImmutableSet.of(BindingReflections.getModuleInfo(Root.class));
     }
 
@@ -61,7 +61,7 @@ public class Bug3090MultiKeyList extends AbstractDataTreeChangeListenerTest {
         listener.verify();
     }
 
         listener.verify();
     }
 
-    private boolean checkData(Root expected, Root actual) {
+    private static boolean checkData(final Root expected, final Root actual) {
         if (actual == null) {
             return false;
         }
         if (actual == null) {
             return false;
         }
index 58176a0..91d86c1 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.md.sal.binding.impl.test;
 
 import static org.junit.Assert.assertEquals;
 package org.opendaylight.controller.md.sal.binding.impl.test;
 
 import static org.junit.Assert.assertEquals;
@@ -27,6 +26,7 @@ import com.google.common.collect.Iterables;
 import com.google.common.util.concurrent.SettableFuture;
 import java.util.ArrayList;
 import java.util.Collection;
 import com.google.common.util.concurrent.SettableFuture;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import org.junit.Before;
 import org.junit.Test;
 import java.util.concurrent.TimeUnit;
 import org.junit.Before;
 import org.junit.Test;
@@ -88,7 +88,7 @@ public class DataTreeChangeListenerTest extends AbstractConcurrentDataBrokerTest
     }
 
     @Override
     }
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(
                 BindingReflections.getModuleInfo(TwoLevelList.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class)
         return ImmutableSet.of(
                 BindingReflections.getModuleInfo(TwoLevelList.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class)
index 7c65043..7eef5db 100644 (file)
@@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import java.util.ArrayList;
 import java.util.List;
 import com.google.common.collect.ImmutableSet;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
@@ -39,7 +40,7 @@ public class ForwardedNotificationAdapterTest extends AbstractNotificationBroker
     private static final Logger LOG = LoggerFactory.getLogger(ForwardedNotificationAdapterTest.class);
 
     @Override
     private static final Logger LOG = LoggerFactory.getLogger(ForwardedNotificationAdapterTest.class);
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(TwoLevelListChanged.class));
 
     }
         return ImmutableSet.of(BindingReflections.getModuleInfo(TwoLevelListChanged.class));
 
     }
index 01e5e0e..143cb8e 100644 (file)
@@ -45,7 +45,7 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataTreeChangeL
     private static final InstanceIdentifier<TopLevelList> TOP_BAR = TOP.child(TopLevelList.class, TOP_BAR_KEY);
 
     @Override
     private static final InstanceIdentifier<TopLevelList> TOP_BAR = TOP.child(TopLevelList.class, TOP_BAR_KEY);
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class));
     }
 
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class));
     }
 
@@ -160,7 +160,8 @@ public class ListInsertionDataChangeListenerTest extends AbstractDataTreeChangeL
         barListener.verify();
     }
 
         barListener.verify();
     }
 
-    private Function<DataTreeModification<Top>, Boolean> topSubtreeModified(TopLevelList topFoo, TopLevelList topBar) {
+    private Function<DataTreeModification<Top>, Boolean> topSubtreeModified(final TopLevelList topFoo,
+            final TopLevelList topBar) {
         return match(ModificationType.SUBTREE_MODIFIED, TOP,
             (Function<Top, Boolean>) dataBefore -> Objects.equals(top(topFoo), dataBefore),
             dataAfter -> {
         return match(ModificationType.SUBTREE_MODIFIED, TOP,
             (Function<Top, Boolean>) dataBefore -> Objects.equals(top(topFoo), dataBefore),
             dataAfter -> {
index aebe05d..db77bc5 100644 (file)
@@ -7,23 +7,42 @@
  */
 package org.opendaylight.controller.md.sal.binding.test;
 
  */
 package org.opendaylight.controller.md.sal.binding.test;
 
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.google.common.collect.ImmutableSet;
+import java.util.Set;
 import org.junit.Before;
 import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
 import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
 import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 import org.junit.Before;
 import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
 import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
 import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
-public abstract class AbstractSchemaAwareTest  {
+public abstract class AbstractSchemaAwareTest {
+    private static final LoadingCache<ClassLoader, Set<YangModuleInfo>> MODULE_INFO_CACHE = CacheBuilder.newBuilder()
+            .weakKeys().weakValues().build(new CacheLoader<ClassLoader, Set<YangModuleInfo>>() {
+                @Override
+                public Set<YangModuleInfo> load(final ClassLoader key) {
+                    return BindingReflections.loadModuleInfos(key);
+                }
+            });
+    private static final LoadingCache<Set<YangModuleInfo>, SchemaContext> SCHEMA_CONTEXT_CACHE =
+            CacheBuilder.newBuilder().weakValues().build(new CacheLoader<Set<YangModuleInfo>, SchemaContext>() {
+                @Override
+                public SchemaContext load(final Set<YangModuleInfo> key) {
+                    final ModuleInfoBackedContext moduleContext = ModuleInfoBackedContext.create();
+                    moduleContext.addModuleInfos(key);
+                    return moduleContext.tryToCreateSchemaContext().get();
+                }
+            });
 
 
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
-        return BindingReflections.loadModuleInfos();
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
+        return MODULE_INFO_CACHE.getUnchecked(Thread.currentThread().getContextClassLoader());
     }
 
     protected SchemaContext getSchemaContext() throws Exception {
     }
 
     protected SchemaContext getSchemaContext() throws Exception {
-        final Iterable<YangModuleInfo> moduleInfos = getModuleInfos();
-        final ModuleInfoBackedContext moduleContext = ModuleInfoBackedContext.create();
-        moduleContext.addModuleInfos(moduleInfos);
-        return moduleContext.tryToCreateSchemaContext().get();
+        // ImmutableSet guarantees non-null
+        return SCHEMA_CONTEXT_CACHE.getUnchecked(ImmutableSet.copyOf(getModuleInfos()));
     }
 
     @Before
     }
 
     @Before
index 7e245a3..93f15b7 100644 (file)
@@ -15,7 +15,10 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
  * it for each Test, and is thus faster.
  *
  * @author Michael Vorburger
  * it for each Test, and is thus faster.
  *
  * @author Michael Vorburger
+ * @deprecated This class is no longer useful, as {@link AbstractSchemaAwareTest#getSchemaContext()} provides effective
+ *             caching.
  */
  */
+@Deprecated
 public class ConstantSchemaAbstractDataBrokerTest extends AbstractConcurrentDataBrokerTest {
 
     public ConstantSchemaAbstractDataBrokerTest() {
 public class ConstantSchemaAbstractDataBrokerTest extends AbstractConcurrentDataBrokerTest {
 
     public ConstantSchemaAbstractDataBrokerTest() {
index 49eb5aa..32f84a8 100644 (file)
@@ -17,12 +17,14 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
  * SchemaContext.
  *
  * @author Michael Vorburger
  * SchemaContext.
  *
  * @author Michael Vorburger
+ * @deprecated This class should not be used, as it pollutes the classpath.
  */
  */
+@Deprecated
 public final class SchemaContextSingleton {
 
     private static SchemaContext staticSchemaContext;
 
 public final class SchemaContextSingleton {
 
     private static SchemaContext staticSchemaContext;
 
-    public static synchronized SchemaContext getSchemaContext(Supplier<SchemaContext> supplier) throws Exception {
+    public static synchronized SchemaContext getSchemaContext(final Supplier<SchemaContext> supplier) throws Exception {
         if (staticSchemaContext == null) {
             staticSchemaContext = supplier.get();
         }
         if (staticSchemaContext == null) {
             staticSchemaContext = supplier.get();
         }
index ff6d02b..4f11c50 100644 (file)
@@ -13,6 +13,7 @@ import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastor
 import com.google.common.collect.ImmutableSet;
 import com.google.common.util.concurrent.Uninterruptibles;
 import java.util.Collections;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.util.concurrent.Uninterruptibles;
 import java.util.Collections;
+import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -80,7 +81,7 @@ public class WildcardedDataChangeListenerTest extends AbstractDataTreeChangeList
             .withKey(LIST_VIA_USES_KEY).setName("john").build();
 
     @Override
             .withKey(LIST_VIA_USES_KEY).setName("john").build();
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
index d912674..81d7e9d 100644 (file)
@@ -5,10 +5,10 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.sal.binding.test.bugfix;
 
 import com.google.common.collect.ImmutableSet;
 package org.opendaylight.controller.sal.binding.test.bugfix;
 
 import com.google.common.collect.ImmutableSet;
+import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -52,7 +52,7 @@ public class DeleteNestedAugmentationListenParentTest extends AbstractDataTreeCh
             .build();
 
     @Override
             .build();
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(List11SimpleAugment.class));
     }
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(List11SimpleAugment.class));
     }
index d05e0b6..0983614 100644 (file)
@@ -11,6 +11,7 @@ import static org.junit.Assert.assertEquals;
 import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.OPERATIONAL;
 
 import com.google.common.collect.ImmutableSet;
 import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.OPERATIONAL;
 
 import com.google.common.collect.ImmutableSet;
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import java.util.concurrent.TimeUnit;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -42,7 +43,7 @@ public class WriteParentListenAugmentTest extends AbstractDataTreeChangeListener
             .builder(Top.class).child(TopLevelList.class, TLL_KEY).augmentation(TreeComplexUsesAugment.class).build();
 
     @Override
             .builder(Top.class).child(TopLevelList.class, TLL_KEY).augmentation(TreeComplexUsesAugment.class).build();
 
     @Override
-    protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+    protected Set<YangModuleInfo> getModuleInfos() throws Exception {
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }
         return ImmutableSet.of(BindingReflections.getModuleInfo(Top.class),
                 BindingReflections.getModuleInfo(TreeComplexUsesAugment.class));
     }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.