[
https://issues.jboss.org/browse/ISPN-1570?page=com.atlassian.jira.plugin....
]
Paul Ferraro commented on ISPN-1570:
------------------------------------
This is due to a faulty validation condition:
@Override
public AsyncConfigurationBuilder async() {
if (!cacheMode.isSynchronous())
throw new IllegalStateException("Cannot configure a async for an sync cache.
Set the cache mode to async first.");
return asyncConfigurationBuilder;
}
The condition needs to be inverted.
Can't configure async caches with new config builder
----------------------------------------------------
Key: ISPN-1570
URL:
https://issues.jboss.org/browse/ISPN-1570
Project: Infinispan
Issue Type: Bug
Components: Configuration
Affects Versions: 5.1.0.BETA5
Reporter: Galder Zamarreño
Assignee: Pete Muir
Priority: Blocker
Fix For: 5.1.0.CR1
The following test:
{code}public void testReplAsyncWithQueue() {
Configuration configuration = new ConfigurationBuilder()
.clustering().cacheMode(CacheMode.REPL_ASYNC)
.async().useReplQueue(true).replQueueInterval(1222)
.build();
org.infinispan.config.Configuration legacy = new
LegacyConfigurationAdaptor().adapt(configuration);
}{code}
Fails with:
{code}java.lang.IllegalStateException: Cannot configure a async for an sync cache. Set
the cache mode to async first.
at
org.infinispan.configuration.cache.ClusteringConfigurationBuilder.async(ClusteringConfigurationBuilder.java:32)
at
org.infinispan.configuration.ConfigurationUnitTest.testReplAsyncWithQueue(ConfigurationUnitTest.java:81){code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira