1 |
| package org.jboss.cache.passivation; |
2 |
| |
3 |
| import junit.framework.Test; |
4 |
| import junit.framework.TestSuite; |
5 |
| import org.jboss.cache.CacheImpl; |
6 |
| import org.jboss.cache.DefaultCacheFactory; |
7 |
| import org.jboss.cache.config.Configuration; |
8 |
| import org.jboss.cache.loader.DelegatingCacheLoader; |
9 |
| import org.jboss.cache.loader.LocalDelegatingCacheLoader; |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| public class PassivationToLocalDelegatingCacheLoaderTest extends PassivationTestsBase |
18 |
| { |
19 |
| CacheImpl delegating_cache; |
20 |
| DelegatingCacheLoader cache_loader; |
21 |
| |
22 |
| |
23 |
45
| protected void configureCache() throws Exception
|
24 |
| { |
25 |
45
| delegating_cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
|
26 |
45
| delegating_cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
|
27 |
45
| delegating_cache.create();
|
28 |
45
| delegating_cache.start();
|
29 |
45
| cache_loader = new LocalDelegatingCacheLoader(delegating_cache);
|
30 |
| |
31 |
45
| cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig("", "org.jboss.cache.loader.LocalDelegatingCacheLoader", "", false, false));
|
32 |
45
| cache.setCacheLoader(cache_loader);
|
33 |
| } |
34 |
| |
35 |
45
| protected void tearDown() throws Exception
|
36 |
| { |
37 |
45
| super.tearDown();
|
38 |
45
| delegating_cache.stop();
|
39 |
45
| delegating_cache.destroy();
|
40 |
| } |
41 |
| |
42 |
1
| public void testLoadAndStore() throws Exception
|
43 |
| { |
44 |
| |
45 |
| |
46 |
| } |
47 |
| |
48 |
| |
49 |
1
| public static Test suite()
|
50 |
| { |
51 |
1
| return new TestSuite(PassivationToLocalDelegatingCacheLoaderTest.class);
|
52 |
| } |
53 |
| |
54 |
| |
55 |
0
| public static void main(String[] args)
|
56 |
| { |
57 |
0
| junit.textui.TestRunner.run(suite());
|
58 |
| } |
59 |
| |
60 |
| } |