Permalink
Browse files

ISPN-2441 Some core interceptors trigger custom interceptor error mes…

…sage

This happens during the test suite due to InterceptorChainTest not initializing the ComponentMetadataRepo properly.
  • Loading branch information...
1 parent bf625b2 commit 7b6120bc9c08b3849c6a160dd01bacb36e901523 @anistor anistor committed Mar 18, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 core/src/test/java/org/infinispan/interceptors/InterceptorChainTest.java
@@ -20,6 +20,7 @@
package org.infinispan.interceptors;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.CyclicBarrier;
@@ -28,6 +29,7 @@
import java.util.concurrent.Future;
import org.infinispan.factories.components.ComponentMetadataRepo;
+import org.infinispan.factories.components.ModuleMetadataFileFinder;
import org.infinispan.interceptors.base.CommandInterceptor;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
@@ -46,7 +48,9 @@
private static final Log log = LogFactory.getLog(InterceptorChainTest.class);
public void testConcurrentAddRemove() throws Exception {
- InterceptorChain ic = new InterceptorChain(new ComponentMetadataRepo());
+ ComponentMetadataRepo componentMetadataRepo = new ComponentMetadataRepo();
+ componentMetadataRepo.initialize(Collections.<ModuleMetadataFileFinder>emptyList(), InterceptorChainTest.class.getClassLoader());
+ InterceptorChain ic = new InterceptorChain(componentMetadataRepo);
ic.setFirstInChain(new CallInterceptor());
ic.addInterceptor(new ActivationInterceptor(), 1);
CyclicBarrier barrier = new CyclicBarrier(4);

0 comments on commit 7b6120b

Please sign in to comment.