[infinispan-issues] [JBoss JIRA] (ISPN-7844) Cache templates with Type fail when they enable indexing
Tristan Tarrant (JIRA)
issues at jboss.org
Wed May 17 15:48:00 EDT 2017
Tristan Tarrant created ISPN-7844:
-------------------------------------
Summary: Cache templates with Type fail when they enable indexing
Key: ISPN-7844
URL: https://issues.jboss.org/browse/ISPN-7844
Project: Infinispan
Issue Type: Bug
Components: Configuration
Affects Versions: 9.0.0.Final
Reporter: Tristan Tarrant
Assignee: William Burns
Fix For: 9.1.0.Final, 9.0.1.Final
The following test fails:
{code:java}
import static org.testng.AssertJUnit.assertEquals;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.configuration.cache.Index;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.Test;
;
@Test(groups = "functional")
public class CacheCreateTest extends SingleCacheManagerTest {
@Override
protected EmbeddedCacheManager createCacheManager() throws Exception {
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.indexing().index(Index.ALL);
return TestCacheManagerFactory.createCacheManager(builder);
}
public void createCacheTest() {
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.read(cacheManager.getDefaultCacheConfiguration());
builder.template(false);
cacheManager.defineConfiguration("newCache", builder.build());
assertEquals(cacheManager.getDefaultCacheConfiguration(), cacheManager.getCacheConfiguration("newCache"));
cacheManager.getCache("newCache");
}
}
{code}
With the following stacktrace:
{noformat}
import static org.testng.AssertJUnit.assertEquals;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.configuration.cache.Index;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.test.SingleCacheManagerTest;
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.Test;
;
@Test(groups = "functional")
public class CacheCreateTest extends SingleCacheManagerTest {
@Override
protected EmbeddedCacheManager createCacheManager() throws Exception {
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.indexing().index(Index.ALL);
return TestCacheManagerFactory.createCacheManager(builder);
}
public void createCacheTest() {
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.read(cacheManager.getDefaultCacheConfiguration());
builder.template(false);
cacheManager.defineConfiguration("newCache", builder.build());
assertEquals(cacheManager.getDefaultCacheConfiguration(), cacheManager.getCacheConfiguration("newCache"));
cacheManager.getCache("newCache");
}
}
{noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the infinispan-issues
mailing list