KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > invalidation > InvalidationInterceptorTest


1 /*
2  * JBoss, Home of Professional Open Source
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.cache.invalidation;
8
9 import junit.framework.Assert;
10 import junit.framework.Test;
11 import junit.framework.TestCase;
12 import junit.framework.TestSuite;
13 import junit.textui.TestRunner;
14 import org.apache.commons.logging.Log;
15 import org.apache.commons.logging.LogFactory;
16 import org.jboss.cache.CacheImpl;
17 import org.jboss.cache.Fqn;
18 import org.jboss.cache.config.CacheLoaderConfig;
19 import org.jboss.cache.config.Configuration;
20 import org.jboss.cache.factories.XmlConfigurationParser;
21 import org.jboss.cache.misc.TestingUtil;
22 import org.jboss.cache.xml.XmlHelper;
23 import org.w3c.dom.Element JavaDoc;
24
25 import javax.transaction.RollbackException JavaDoc;
26 import javax.transaction.Transaction JavaDoc;
27 import javax.transaction.TransactionManager JavaDoc;
28 import java.io.File JavaDoc;
29
30 /**
31  * Tests the async interceptor
32  *
33  * @author <a HREF="mailto:manik@jboss.org">Manik Surtani (manik@jboss.org)</a>
34  */

35 public class InvalidationInterceptorTest extends TestCase
36 {
37
38    private static Log log = LogFactory.getLog(InvalidationInterceptorTest.class);
39
40    public void testPessimisticNonTransactional() throws Exception JavaDoc
41    {
42       CacheImpl cache1 = createCache(false);
43       CacheImpl cache2 = createCache(false);
44
45       Fqn fqn = Fqn.fromString("/a/b");
46       cache1.put(fqn, "key", "value");
47
48       // test that this has NOT replicated, but rather has been invalidated:
49
Assert.assertEquals("value", cache1.get(fqn, "key"));
50       Assert.assertNull("Should NOT have replicated!", cache2.get(fqn));
51
52       log.info("***** Node not replicated, as expected.");
53
54       // now make sure cache2 is in sync with cache1:
55
cache2.put(fqn, "key", "value");
56       Assert.assertNull("Should be null", cache1.get(fqn));
57       Assert.assertEquals("value", cache2.get(fqn, "key"));
58
59       // now test the invalidation:
60
cache1.put(fqn, "key2", "value2");
61       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
62       Assert.assertNull("Should have been invalidated!", cache2.get(fqn));
63
64       // clean up.
65
cache1.stop();
66       cache2.stop();
67       cache1 = null;
68       cache2 = null;
69    }
70
71    public void testUnnecessaryEvictions() throws Exception JavaDoc
72    {
73       CacheImpl cache1 = createCache(false);
74       CacheImpl cache2 = createCache(false);
75
76       Fqn fqn1 = Fqn.fromString("/a/b/c");
77       Fqn fqn2 = Fqn.fromString("/a/b/d");
78
79       cache1.put(fqn1, "hello", "world");
80
81       assertEquals("world", cache1.get(fqn1, "hello"));
82       assertNull(cache2.get(fqn1, "hello"));
83
84       cache2.put(fqn2, "hello", "world");
85       assertEquals("world", cache1.get(fqn1, "hello"));
86       assertNull(cache2.get(fqn1, "hello"));
87       assertEquals("world", cache2.get(fqn2, "hello"));
88       assertNull(cache1.get(fqn2, "hello"));
89
90       cache2.put(fqn1, "hello", "world");
91       assertEquals("world", cache2.get(fqn1, "hello"));
92       assertEquals("world", cache2.get(fqn2, "hello"));
93       assertNull(cache1.get(fqn1, "hello"));
94       assertNull(cache1.get(fqn2, "hello"));
95
96       cache1.stop();
97       cache2.stop();
98       cache1 = null;
99       cache2 = null;
100
101    }
102
103
104    public void testPessimisticNonTransactionalAsync() throws Exception JavaDoc
105    {
106       CacheImpl cache1 = createUnstartedCache(false);
107       CacheImpl cache2 = createUnstartedCache(false);
108       cache1.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);
109       cache2.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);
110       cache1.start();
111       cache2.start();
112
113       Fqn fqn = Fqn.fromString("/a/b");
114       cache1.put(fqn, "key", "value");
115       TestingUtil.sleepThread(500); // give it time to broadcast the evict call
116
// test that this has NOT replicated, but rather has been invalidated:
117
Assert.assertEquals("value", cache1.get(fqn, "key"));
118       Assert.assertNull("Should NOT have replicated!", cache2.get(fqn));
119
120       log.info("***** Node not replicated, as expected.");
121
122       // now make sure cache2 is in sync with cache1:
123
cache2.put(fqn, "key", "value");
124       TestingUtil.sleepThread(500); // give it time to broadcast the evict call
125
Assert.assertNull("Should be null", cache1.get(fqn));
126       Assert.assertEquals("value", cache2.get(fqn, "key"));
127
128       // now test the invalidation:
129
cache1.put(fqn, "key2", "value2");
130       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
131       TestingUtil.sleepThread(500); // give it time to broadcast the evict call
132
Assert.assertNull("Should have been invalidated!", cache2.get(fqn));
133
134       // clean up.
135
cache1.stop();
136       cache2.stop();
137       cache1 = null;
138       cache2 = null;
139    }
140
141
142    public void testPessimisticTransactional() throws Exception JavaDoc
143    {
144       CacheImpl cache1 = createCache(false);
145       CacheImpl cache2 = createCache(false);
146
147       Fqn fqn = Fqn.fromString("/a/b");
148       cache1.put(fqn, "key", "value");
149
150       // test that this has NOT replicated, but rather has been invalidated:
151
Assert.assertEquals("value", cache1.get(fqn, "key"));
152       Assert.assertNull("Should NOT have replicated!", cache2.get(fqn));
153
154       log.info("***** Node not replicated, as expected.");
155
156       // now make sure cache2 is in sync with cache1:
157
// make sure this is in a tx
158
TransactionManager JavaDoc txm = cache2.getTransactionManager();
159       Assert.assertEquals("value", cache1.get(fqn, "key"));
160
161       txm.begin();
162       cache2.put(fqn, "key", "value");
163       Assert.assertEquals("value", cache2.get(fqn, "key"));
164       txm.commit();
165
166       Assert.assertNull("Should be null", cache1.get(fqn));
167       Assert.assertEquals("value", cache2.get(fqn, "key"));
168
169       // now test the invalidation again
170
txm = cache1.getTransactionManager();
171       Assert.assertEquals("value", cache2.get(fqn, "key"));
172
173       txm.begin();
174       cache1.put(fqn, "key2", "value2");
175       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
176       txm.commit();
177
178       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
179       Assert.assertNull("Should have been invalidated!", cache2.get(fqn));
180
181       // test a rollback
182
txm = cache2.getTransactionManager();
183       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
184
185       txm.begin();
186       cache2.put(fqn, "key", "value");
187       Assert.assertEquals("value", cache2.get(fqn, "key"));
188       txm.rollback();
189
190       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
191       Assert.assertNull("Should not have committed", cache2.get(fqn));
192
193       // clean up.
194
cache1.stop();
195       cache2.stop();
196       cache1 = null;
197       cache2 = null;
198
199    }
200
201
202    public void testOptSyncUnableToEvict() throws Exception JavaDoc
203    {
204       CacheImpl cache1 = createCache(true);
205       CacheImpl cache2 = createCache(true);
206
207       Fqn fqn = Fqn.fromString("/a/b");
208
209       cache2.put(fqn, "key", "value");
210       Assert.assertEquals("value", cache2.get(fqn, "key"));
211       Assert.assertNull(cache1.get(fqn));
212
213       // start a tx that cache1 will have to send out an evict ...
214
TransactionManager JavaDoc mgr1 = cache1.getTransactionManager();
215       TransactionManager JavaDoc mgr2 = cache2.getTransactionManager();
216
217       mgr1.begin();
218       cache1.put(fqn, "key2", "value2");
219       Transaction JavaDoc tx1 = mgr1.suspend();
220       mgr2.begin();
221       cache2.put(fqn, "key3", "value3");
222       Transaction JavaDoc tx2 = mgr2.suspend();
223       mgr1.resume(tx1);
224       // this oughtta fail
225
try
226       {
227          mgr1.commit();
228          Assert.assertTrue("Ought to have succeeded!", true);
229       }
230       catch (RollbackException JavaDoc roll)
231       {
232          Assert.assertTrue("Ought to have succeeded!", false);
233       }
234
235       mgr2.resume(tx2);
236       try
237       {
238          mgr2.commit();
239          Assert.assertTrue("Ought to have failed!", false);
240       }
241       catch (RollbackException JavaDoc roll)
242       {
243          Assert.assertTrue("Ought to have failed!", true);
244       }
245       // clean up.
246
cache1.stop();
247       cache2.stop();
248       cache1 = null;
249       cache2 = null;
250    }
251
252    public void testPessTxSyncUnableToEvict() throws Exception JavaDoc
253    {
254       CacheImpl cache1 = createCache(false);
255       CacheImpl cache2 = createCache(false);
256
257       Fqn fqn = Fqn.fromString("/a/b");
258
259       cache1.put("/a/b", "key", "value");
260       Assert.assertEquals("value", cache1.get(fqn, "key"));
261       Assert.assertNull(cache2.get(fqn));
262
263       // start a tx that cacahe1 will have to send out an evict ...
264
TransactionManager JavaDoc mgr1 = cache1.getTransactionManager();
265       TransactionManager JavaDoc mgr2 = cache2.getTransactionManager();
266
267       mgr1.begin();
268       cache1.put(fqn, "key2", "value2");
269       Transaction JavaDoc tx1 = mgr1.suspend();
270       mgr2.begin();
271       cache2.put(fqn, "key3", "value3");
272       Transaction JavaDoc tx2 = mgr2.suspend();
273       mgr1.resume(tx1);
274       // this oughtta fail
275
try
276       {
277          mgr1.commit();
278          Assert.assertTrue("Ought to have failed!", false);
279       }
280       catch (RollbackException JavaDoc roll)
281       {
282          Assert.assertTrue("Ought to have failed!", true);
283       }
284
285       mgr2.resume(tx2);
286       try
287       {
288          mgr2.commit();
289          Assert.assertTrue("Ought to have succeeded!", true);
290       }
291       catch (RollbackException JavaDoc roll)
292       {
293          Assert.assertTrue("Ought to have succeeded!", false);
294       }
295       // clean up.
296
cache1.stop();
297       cache2.stop();
298       cache1 = null;
299       cache2 = null;
300    }
301
302    public void testPessTxAsyncUnableToEvict() throws Exception JavaDoc
303    {
304       CacheImpl cache1 = createUnstartedCache(false);
305       CacheImpl cache2 = createUnstartedCache(false);
306       cache1.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);
307       cache2.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_ASYNC);
308       cache1.start();
309       cache2.start();
310
311       Fqn fqn = Fqn.fromString("/a/b");
312
313       cache1.put("/a/b", "key", "value");
314       Assert.assertEquals("value", cache1.get(fqn, "key"));
315       Assert.assertNull(cache2.get(fqn));
316
317       // start a tx that cacahe1 will have to send out an evict ...
318
TransactionManager JavaDoc mgr1 = cache1.getTransactionManager();
319       TransactionManager JavaDoc mgr2 = cache2.getTransactionManager();
320
321       mgr1.begin();
322       cache1.put(fqn, "key2", "value2");
323       Transaction JavaDoc tx1 = mgr1.suspend();
324       mgr2.begin();
325       cache2.put(fqn, "key3", "value3");
326       Transaction JavaDoc tx2 = mgr2.suspend();
327       mgr1.resume(tx1);
328       // this oughtta fail
329
try
330       {
331          mgr1.commit();
332          Assert.assertTrue("Ought to have succeeded!", true);
333       }
334       catch (RollbackException JavaDoc roll)
335       {
336          Assert.assertTrue("Ought to have succeeded!", false);
337       }
338
339       mgr2.resume(tx2);
340       try
341       {
342          mgr2.commit();
343          Assert.assertTrue("Ought to have succeeded!", true);
344       }
345       catch (RollbackException JavaDoc roll)
346       {
347          Assert.assertTrue("Ought to have succeeded!", false);
348       }
349       // clean up.
350
cache1.stop();
351       cache2.stop();
352       cache1 = null;
353       cache2 = null;
354    }
355
356
357    public void testOptimistic() throws Exception JavaDoc
358    {
359       CacheImpl cache1 = createCache(true);
360       CacheImpl cache2 = createCache(true);
361
362       Fqn fqn = Fqn.fromString("/a/b");
363       cache1.put(fqn, "key", "value");
364
365       // test that this has NOT replicated, but rather has been invalidated:
366
Assert.assertEquals("value", cache1.get(fqn, "key"));
367       Assert.assertNull("Should NOT have replicated!", cache2.get(fqn));
368
369       log.info("***** Node not replicated, as expected.");
370
371       // now make sure cache2 is in sync with cache1:
372
cache2.put(fqn, "key", "value");
373       Assert.assertNull("Should be null", cache1.get(fqn));
374       Assert.assertEquals("value", cache2.get(fqn, "key"));
375
376       // now test the invalidation:
377
cache1.put(fqn, "key2", "value2");
378       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
379       Assert.assertNull("Should have been invalidated!", cache2.get(fqn));
380
381       // with tx's
382
TransactionManager JavaDoc txm = cache2.getTransactionManager();
383
384       txm.begin();
385       cache2.put(fqn, "key", "value");
386       Assert.assertEquals("value", cache2.get(fqn, "key"));
387       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
388       txm.commit();
389
390       Assert.assertNull("Should be null", cache1.get(fqn));
391       Assert.assertEquals("value", cache2.get(fqn, "key"));
392
393       // now test the invalidation again
394
txm = cache1.getTransactionManager();
395
396       txm.begin();
397       cache1.put(fqn, "key2", "value2");
398       Assert.assertEquals("value", cache2.get(fqn, "key"));
399       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
400       txm.commit();
401
402       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
403       Assert.assertNull("Should have been invalidated!", cache2.get(fqn));
404
405       // test a rollback
406
txm = cache2.getTransactionManager();
407
408       txm.begin();
409       cache2.put(fqn, "key", "value");
410       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
411       Assert.assertEquals("value", cache2.get(fqn, "key"));
412       txm.rollback();
413
414       Assert.assertEquals("value2", cache1.get(fqn, "key2"));
415       Assert.assertNull("Should not have committed", cache2.get(fqn));
416
417       // clean up.
418
cache1.stop();
419       cache2.stop();
420       cache1 = null;
421       cache2 = null;
422
423    }
424
425    public void testPessimisticNonTransactionalWithCacheLoader() throws Exception JavaDoc
426    {
427       CacheImpl[] caches = createCachesWithSharedCL(false);
428
429       Fqn fqn = Fqn.fromString("/a/b");
430       caches[0].put(fqn, "key", "value");
431
432       Assert.assertEquals("value", caches[0].get(fqn, "key"));
433       Assert.assertEquals("value", caches[1].get(fqn, "key"));
434
435       // now make sure cache2 is in sync with cache1:
436
caches[1].put(fqn, "key", "value");
437       Assert.assertEquals("value", caches[1].get(fqn, "key"));
438       Assert.assertEquals("value", caches[0].get(fqn, "key"));
439
440       // now test the invalidation:
441
caches[0].put(fqn, "key2", "value2");
442       Assert.assertEquals("value2", caches[0].get(fqn, "key2"));
443       Assert.assertEquals("value2", caches[1].get(fqn, "key2"));
444       Assert.assertEquals("value", caches[0].get(fqn, "key"));
445       Assert.assertEquals("value", caches[1].get(fqn, "key"));
446
447       // clean up.
448
caches[0].remove(fqn);
449       caches[1].remove(fqn);
450       caches[0].stop();
451       caches[1].stop();
452       caches[0] = null;
453       caches[1] = null;
454    }
455
456    public void testPessimisticTransactionalWithCacheLoader() throws Exception JavaDoc
457    {
458       CacheImpl[] caches = createCachesWithSharedCL(false);
459
460       Fqn fqn = Fqn.fromString("/a/b");
461       TransactionManager JavaDoc mgr = caches[0].getTransactionManager();
462       Assert.assertNull("Should be null", caches[0].get(fqn, "key"));
463       Assert.assertNull("Should be null", caches[1].get(fqn, "key"));
464       mgr.begin();
465       caches[0].put(fqn, "key", "value");
466       Assert.assertEquals("value", caches[0].get(fqn, "key"));
467       mgr.commit();
468       Assert.assertEquals("value", caches[1].get(fqn, "key"));
469       Assert.assertEquals("value", caches[0].get(fqn, "key"));
470
471       mgr.begin();
472       caches[0].put(fqn, "key2", "value2");
473       Assert.assertEquals("value2", caches[0].get(fqn, "key2"));
474       mgr.rollback();
475       Assert.assertEquals("value", caches[1].get(fqn, "key"));
476       Assert.assertEquals("value", caches[0].get(fqn, "key"));
477       Assert.assertNull("Should be null", caches[0].get(fqn, "key2"));
478       Assert.assertNull("Should be null", caches[1].get(fqn, "key2"));
479
480       // clean up.
481
caches[0].remove(fqn);
482       caches[1].remove(fqn);
483       caches[0].stop();
484       caches[1].stop();
485       caches[0] = null;
486       caches[1] = null;
487    }
488
489    public void testOptimisticWithCacheLoader() throws Exception JavaDoc
490    {
491       CacheImpl[] caches = createCachesWithSharedCL(true);
492
493       Fqn fqn = Fqn.fromString("/a/b");
494       TransactionManager JavaDoc mgr = caches[0].getTransactionManager();
495       Assert.assertNull("Should be null", caches[0].get(fqn, "key"));
496       Assert.assertNull("Should be null", caches[1].get(fqn, "key"));
497       mgr.begin();
498       caches[0].put(fqn, "key", "value");
499       Assert.assertEquals("value", caches[0].get(fqn, "key"));
500       Assert.assertNull("Should be null", caches[1].get(fqn, "key"));
501       mgr.commit();
502       Assert.assertEquals("value", caches[1].get(fqn, "key"));
503       Assert.assertEquals("value", caches[0].get(fqn, "key"));
504
505       mgr.begin();
506       caches[0].put(fqn, "key2", "value2");
507       Assert.assertEquals("value2", caches[0].get(fqn, "key2"));
508       Assert.assertNull("Should be null", caches[1].get(fqn, "key2"));
509       mgr.rollback();
510       Assert.assertEquals("value", caches[1].get(fqn, "key"));
511       Assert.assertEquals("value", caches[0].get(fqn, "key"));
512       Assert.assertNull("Should be null", caches[0].get(fqn, "key2"));
513       Assert.assertNull("Should be null", caches[1].get(fqn, "key2"));
514
515       // clean up.
516
caches[0].remove(fqn);
517       caches[1].remove(fqn);
518       caches[0].stop();
519       caches[1].stop();
520       caches[0] = null;
521       caches[1] = null;
522    }
523
524    public void testInvalidationWithRegionBasedMarshalling() throws Exception JavaDoc
525    {
526       doRegionBasedTest(false);
527    }
528
529    public void testInvalidationWithRegionBasedMarshallingOptimistic() throws Exception JavaDoc
530    {
531       doRegionBasedTest(true);
532    }
533
534    protected void doRegionBasedTest(boolean optimistic) throws Exception JavaDoc
535    {
536       CacheImpl[] caches = new CacheImpl[2];
537       caches[0] = createUnstartedCache(false);
538       caches[1] = createUnstartedCache(false);
539
540       caches[0].getConfiguration().setUseRegionBasedMarshalling(true);
541       caches[1].getConfiguration().setUseRegionBasedMarshalling(true);
542
543       if (optimistic)
544       {
545          caches[0].getConfiguration().setNodeLockingScheme("OPTIMISTIC");
546          caches[1].getConfiguration().setNodeLockingScheme("OPTIMISTIC");
547       }
548
549       caches[0].start();
550       caches[1].start();
551
552       TestingUtil.blockUntilViewsReceived(caches, 5000);
553
554       Fqn fqn = Fqn.fromString("/a/b");
555
556       assertNull("Should be null", caches[0].get(fqn));
557       assertNull("Should be null", caches[1].get(fqn));
558
559       caches[0].put(fqn, "key", "value");
560       assertEquals("expecting value", "value", caches[0].get(fqn, "key"));
561       assertNull("Should be null", caches[1].get(fqn));
562
563       // now put in caches[1], should fire an eviction
564
caches[1].put(fqn, "key", "value2");
565       assertEquals("expecting value2", "value2", caches[1].get(fqn, "key"));
566       assertNull("Should be null", caches[0].get(fqn));
567
568       // clean up.
569
caches[0].remove(fqn);
570       caches[1].remove(fqn);
571       caches[0].stop();
572       caches[1].stop();
573       caches[0] = null;
574       caches[1] = null;
575    }
576
577    protected CacheImpl createUnstartedCache(boolean optimistic) throws Exception JavaDoc
578    {
579       CacheImpl cache = new CacheImpl();
580       cache.getConfiguration().setClusterName("MyCluster");
581       cache.getConfiguration().setInitialStateRetrievalTimeout(3000);
582       cache.getConfiguration().setCacheMode(Configuration.CacheMode.INVALIDATION_SYNC);
583       if (optimistic) cache.getConfiguration().setNodeLockingScheme("OPTIMISTIC");
584       cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
585       return cache;
586    }
587
588    protected CacheImpl createCache(boolean optimistic) throws Exception JavaDoc
589    {
590       CacheImpl cache = createUnstartedCache(optimistic);
591       cache.start();
592       return cache;
593    }
594
595    protected CacheImpl[] createCachesWithSharedCL(boolean optimistic) throws Exception JavaDoc
596    {
597       CacheImpl[] caches = new CacheImpl[2];
598       caches[0] = createUnstartedCache(optimistic);
599       caches[1] = createUnstartedCache(optimistic);
600
601       caches[0].getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig());
602       caches[1].getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig());
603
604       caches[0].start();
605       caches[1].start();
606       return caches;
607    }
608
609
610    protected CacheLoaderConfig getCacheLoaderConfig() throws Exception JavaDoc
611    {
612       String JavaDoc xml = " <config>\n" +
613               " \n" +
614               " <passivation>false</passivation>\n" +
615               " <preload></preload>\n" +
616               "\n" +
617               " <cacheloader>\n" +
618               " <class>org.jboss.cache.loader.FileCacheLoader</class>\n" +
619               " <properties>\n" +
620               " location=" + getTempDir() + "\n" +
621               " </properties>\n" +
622               " <async>false</async>\n" +
623               " <fetchPersistentState>false</fetchPersistentState>\n" +
624               " <ignoreModifications>false</ignoreModifications>\n" +
625               " </cacheloader>\n" +
626               " \n" +
627               " </config>";
628       Element JavaDoc element = XmlHelper.stringToElement(xml);
629       return XmlConfigurationParser.parseCacheLoaderConfig(element);
630    }
631
632    protected String JavaDoc getTempDir()
633    {
634       String JavaDoc name = "cacheloader";
635       String JavaDoc tempDir = System.getProperty("java.io.tmpdir", "/tmp") + File.separator + "JBossCache-InvalidationInterceptorTestCase-WorkingDir" + File.separator + name;
636       File JavaDoc tempDirFile = new File JavaDoc(tempDir);
637       if (!tempDirFile.exists())
638       {
639          tempDirFile.mkdirs();
640       }
641       return tempDir;
642    }
643
644    public static void main(String JavaDoc[] args)
645    {
646       TestRunner.run(suite());
647    }
648
649    public static Test suite()
650    {
651       return new TestSuite(InvalidationInterceptorTest.class);
652    }
653 }
654
Popular Tags