01: /*
02: * Created on Sep 29, 2005 by phil
03: *
04: */
05: package com.whirlycott.cache.test;
06:
07: import org.apache.commons.logging.Log;
08: import org.apache.commons.logging.LogFactory;
09:
10: import com.whirlycott.cache.CacheException;
11: import com.whirlycott.cache.CacheManager;
12:
13: import junit.framework.TestCase;
14:
15: public class AnotherShutdownTest extends TestCase {
16:
17: /**
18: * Logger
19: */
20: private static final Log log = LogFactory
21: .getLog(AnotherShutdownTest.class);
22:
23: public void testShutdown() throws CacheException,
24: InterruptedException {
25: for (int i = 0; i < 1; i++) {
26: final CacheManager cm = CacheManager.getInstance();
27: Thread.sleep(9999);
28: log.debug("Shutting down now.");
29: final long begin = System.currentTimeMillis();
30: cm.shutdown();
31: final long end = System.currentTimeMillis();
32: log.debug("Shutdown complete: " + (end - begin));
33: }
34: }
35:
36: }
|