View Javadoc

1   package com.atlassian.cache.ehcache;
2   
3   import com.atlassian.cache.AbstractLazyReferenceTest;
4   import com.atlassian.cache.ehcache.cluster.EhCacheCluster;
5   
6   import org.junit.Before;
7   import org.junit.Ignore;
8   import org.junit.Test;
9   
10  import static com.atlassian.cache.ehcache.cluster.EhCacheCluster.clusteredTest;
11  
12  /**
13   * Test the Delegated Lazy Reference
14   *
15   * @since 2.0
16   */
17  public class DelegatingCachedReferenceTest extends AbstractLazyReferenceTest
18  {
19      @Before
20      public void setUp() throws Exception
21      {
22          factory = new EhCacheManager();
23          // Make sure we are not getting old caches for our test.
24          ((EhCacheManager) factory).getEh().removeAllCaches();
25      }
26  
27      @Ignore("CACHE-106/CACHE-108: Needs to be fixed (currently hard fails)")
28      @Test
29      public void testResetConcurrentWithLoadClustered() throws Exception
30      {
31          clusteredTest(2, new EhCacheCluster.ClusteredTest()
32          {
33              @Override
34              public void runTest(EhCacheCluster cluster) throws Exception
35              {
36                  resetConcurrentWithLoad(cluster.getNode(0), cluster.getNode(1));
37              }
38          });
39      }
40  }