Package org.infinispan.test

Examples of org.infinispan.test.CacheManagerCallable


      tm(0).rollback();
   }

   @Test(expectedExceptions = UnsupportedOperationException.class)
   public void testLockOnNonTransactionalCache() {
      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createLocalCacheManager(false)) {
         @Override
         public void call() {
            cm.getCache().getAdvancedCache().lock("k");
         }
View Full Code Here


   }

   public void testNoLockingInterceptorWithoutConcurrentAccess() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.locking().supportsConcurrentUpdates(false);
      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createCacheManager(builder)) {
         @Override
         public void call() {
            AbstractLockingInterceptor locking = TestingUtil.findInterceptor(
                  cm.getCache(), AbstractLockingInterceptor.class);
View Full Code Here

         String fileName = getFileName("all.xml");
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         convertor.parse(fileName, baos, XSLT_FILE, Thread.currentThread().getContextClassLoader());

         System.out.println("Output file is:\n" + baos.toString());
         withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromStream(new ByteArrayInputStream(baos.toByteArray()))) {
            @Override
            public void call() {
               Configuration defaultConfig = cm.getDefaultCacheConfiguration();
               GlobalConfiguration globalConfig = cm.getCacheManagerConfiguration();
View Full Code Here

@Test(groups = "functional", testName = "profiling.CacheCreationStressTest")
public class CacheCreationStressTest extends AbstractInfinispanTest {

   public void testCreateCachesFromSameContainer() {
      final long start = System.currentTimeMillis();
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.createCacheManager()) {
         @Override
         public void call() {
            for (int i = 0; i < 1000; i++) {
               cm.getCache(generateRandomString(20));
            }
View Full Code Here

@Test(groups = {"performance", "manual"})
public class CreateThousandCachesTest {
   public void doTest() {
      System.out.println("Starting... ");
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.createCacheManager()) {
         @Override
         public void call() {
            List<Cache<?, ?>> thousandCaches = new LinkedList<Cache<?, ?>>();
            long start = System.currentTimeMillis();
            for (int i = 0; i < 1000; i++) {
View Full Code Here

      }
   }

   public void testAvoidLeakOfCacheMBeanWhenCacheStatisticsDisabled(Method m) {
      final String jmxDomain = "jmx_" + m.getName();
      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(jmxDomain, false, false)) {
         @Override
         public void call() {
            try {
               cm.getCache();
View Full Code Here

   @Test(expectedExceptions={IllegalStateException.class})
   public void testImproperCacheStateForMapReduceTask() {

      ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(true);

      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.createCacheManager(builder)){
        
         @SuppressWarnings("unused")
         @Override
         public void call() {
            Cache<Object, Object> cache = cm.getCache();
View Full Code Here

   @Test(expectedExceptions = IllegalStateException.class)
   public void testEnsureProperCacheStateMode() {
      ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.INVALIDATION_SYNC, true);

      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.createClusteredCacheManager(builder)) {

         @SuppressWarnings("unused")
         @Override
         public void call() {
            Cache<Object, Object> cache = cm.getCache();
View Full Code Here

   public void testPutAfterPassivation() {
      ConfigurationBuilder builder = asyncStoreWithEvictionBuilder();
      builder.loaders().passivation(true);

      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createCacheManager(builder)) {
         @Override
         public void call() {
            // Hack the component metadata repository
            // to inject the custom cache loader manager
View Full Code Here

   }

   public void testPutAfterEviction() {
      ConfigurationBuilder builder = asyncStoreWithEvictionBuilder();

      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createCacheManager(builder)) {
         @Override
         public void call() {
            // Hack the component metadata repository
            // to inject the custom cache loader manager
View Full Code Here

TOP

Related Classes of org.infinispan.test.CacheManagerCallable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.