RulesIT: Evict cached results instead of disabling cache
Change-Id: I40d5cf441ec43b116eadc18b512558422342f3ff
This commit is contained in:
@@ -29,7 +29,6 @@ import com.google.inject.Inject;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import org.eclipse.jgit.junit.TestRepository;
|
import org.eclipse.jgit.junit.TestRepository;
|
||||||
import org.eclipse.jgit.lib.Repository;
|
import org.eclipse.jgit.lib.Repository;
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,14 +43,6 @@ public class RulesIT extends AbstractDaemonTest {
|
|||||||
@Inject private ProjectOperations projectOperations;
|
@Inject private ProjectOperations projectOperations;
|
||||||
@Inject private SubmitRuleEvaluator.Factory evaluatorFactory;
|
@Inject private SubmitRuleEvaluator.Factory evaluatorFactory;
|
||||||
|
|
||||||
@Before
|
|
||||||
public void setUp() {
|
|
||||||
// We don't want caches to interfere with our tests. If we didn't, the cache would take
|
|
||||||
// precedence over the index, which would never be called.
|
|
||||||
baseConfig.setString("cache", "changes", "memoryLimit", "0");
|
|
||||||
baseConfig.setString("cache", "projects", "memoryLimit", "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUnresolvedCommentsCountPredicate() throws Exception {
|
public void testUnresolvedCommentsCountPredicate() throws Exception {
|
||||||
modifySubmitRules("gerrit:unresolved_comments_count(0)");
|
modifySubmitRules("gerrit:unresolved_comments_count(0)");
|
||||||
@@ -119,5 +110,6 @@ public class RulesIT extends AbstractDaemonTest {
|
|||||||
.message("Modify rules.pl")
|
.message("Modify rules.pl")
|
||||||
.create();
|
.create();
|
||||||
}
|
}
|
||||||
|
projectCache.evict(project);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user