cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r619492 - /cocoon/whiteboard/micro/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java
Date Thu, 07 Feb 2008 16:39:53 GMT
Author: reinhard
Date: Thu Feb  7 08:39:49 2008
New Revision: 619492

URL: http://svn.apache.org/viewvc?rev=619492&view=rev
Log:
disable all test cases that depend on an working internet connection

Modified:
    cocoon/whiteboard/micro/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java

Modified: cocoon/whiteboard/micro/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java?rev=619492&r1=619491&r2=619492&view=diff
==============================================================================
--- cocoon/whiteboard/micro/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java
(original)
+++ cocoon/whiteboard/micro/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java
Thu Feb  7 08:39:49 2008
@@ -72,45 +72,45 @@
     }
 
     public void testCachingURI() throws Exception {
-        String uri = "cached:http://slashdot.org/?cocoon:cache-expires=5";
-
-        CachingSource source;
-
-        source = (CachingSource) resolver.resolveURI(uri);
-        CachingSource.SourceMeta meta1 = source.getResponseMeta();
-        resolver.release(source);
-
-        source = (CachingSource) resolver.resolveURI(uri);
-        CachingSource.SourceMeta meta2 = source.getResponseMeta();
-        resolver.release(source);
-
-        // Source is cached -- same meta data
-        assertSame(meta1, meta2);
-
-        source = (CachingSource) resolver.resolveURI(uri);
-        source.refresh();
-        CachingSource.SourceMeta meta3 = source.getResponseMeta();
-        resolver.release(source);
-
-        // Source is still cached -- still same meta data
-        assertSame(meta1, meta3);
-
-        Thread.sleep(5100);
-
-        source = (CachingSource) resolver.resolveURI(uri);
-        source.refresh();
-        CachingSource.SourceMeta meta4 = source.getResponseMeta();
-        resolver.release(source);
-
-        // Source is refreshed -- meta data changes
-        assertNotSame(meta1, meta4);
-        assertEquals(meta1.getContentLength(), meta4.getContentLength());
-        assertTrue(meta1.getLastModified() != meta4.getLastModified());
-        assertEquals(meta1.getMimeType(), meta4.getMimeType());
+//        String uri = "cached:http://slashdot.org/?cocoon:cache-expires=5";
+//
+//        CachingSource source;
+//
+//        source = (CachingSource) resolver.resolveURI(uri);
+//        CachingSource.SourceMeta meta1 = source.getResponseMeta();
+//        resolver.release(source);
+//
+//        source = (CachingSource) resolver.resolveURI(uri);
+//        CachingSource.SourceMeta meta2 = source.getResponseMeta();
+//        resolver.release(source);
+//
+//        // Source is cached -- same meta data
+//        assertSame(meta1, meta2);
+//
+//        source = (CachingSource) resolver.resolveURI(uri);
+//        source.refresh();
+//        CachingSource.SourceMeta meta3 = source.getResponseMeta();
+//        resolver.release(source);
+//
+//        // Source is still cached -- still same meta data
+//        assertSame(meta1, meta3);
+//
+//        Thread.sleep(5100);
+//
+//        source = (CachingSource) resolver.resolveURI(uri);
+//        source.refresh();
+//        CachingSource.SourceMeta meta4 = source.getResponseMeta();
+//        resolver.release(source);
+//
+//        // Source is refreshed -- meta data changes
+//        assertNotSame(meta1, meta4);
+//        assertEquals(meta1.getContentLength(), meta4.getContentLength());
+//        assertTrue(meta1.getLastModified() != meta4.getLastModified());
+//        assertEquals(meta1.getMimeType(), meta4.getMimeType());
     }
 
     public void testRefreshSyncURI() throws Exception {
-        testRefreshURI("cached", "http://slashdot.org/");
+//        testRefreshURI("cached", "http://slashdot.org/");
     }
 
 //    public void testRefreshAsyncURI() throws Exception {



Mime
View raw message