1 7 package org.jboss.cache.config; 8 9 10 import junit.framework.TestCase; 11 import org.jboss.cache.factories.XmlConfigurationParser; 12 import org.jboss.cache.lock.IsolationLevel; 13 14 17 public class ConfigurationTest extends TestCase 18 { 19 public void testReplSyncStack() throws Exception 20 { 21 XmlConfigurationParser parser = new XmlConfigurationParser(); 22 Configuration conf = parser.parseFile("META-INF/replSync-service.xml"); 23 24 assertEquals(Configuration.CacheMode.REPL_SYNC, conf.getCacheMode()); 26 assertEquals("org.jboss.cache.DummyTransactionManagerLookup", conf.getTransactionManagerLookupClass()); 27 assertEquals(IsolationLevel.REPEATABLE_READ, conf.getIsolationLevel()); 28 assertEquals(false, conf.isUseReplQueue()); 29 assertEquals(0, conf.getReplQueueInterval()); 30 assertEquals(0, conf.getReplQueueMaxElements()); 31 assertEquals("JBossCache-Cluster", conf.getClusterName()); 32 assertEquals(true, conf.isFetchInMemoryState()); 33 assertEquals(15000, conf.getInitialStateRetrievalTimeout()); 34 assertEquals(15000, conf.getSyncReplTimeout()); 35 assertEquals(10000, conf.getLockAcquisitionTimeout()); 36 assertNull(conf.getEvictionConfig()); 37 assertEquals(true, conf.isUseRegionBasedMarshalling()); 38 39 } 42 43 public void testMultiplexerStack() throws Exception 44 { 45 XmlConfigurationParser parser = new XmlConfigurationParser(); 46 Configuration conf = parser.parseFile("META-INF/mux-service.xml"); 47 48 assertEquals("MultiplexerService", "jgroups.mux:name=Multiplexer", conf.getMultiplexerService()); 50 assertEquals("MultiplexerStack", "tcp", conf.getMultiplexerStack()); 51 assertNull("ClusterConfig", conf.getClusterConfig()); 52 } 53 54 } 55 | Popular Tags |