Commits

Anonymous committed 8f03efa

enable testOSCacheFilterFast test for the CacheFilter

  • Participants
  • Parent commits 29db973

Comments (0)

Files changed (1)

File src/test/java/com/opensymphony/oscache/web/TestOscacheFilter.java

         if (wc == null) {
             wc = new WebConversation();
         }
+        compileJSP(constructURL(BASE_PAGE));
     }
 
     /**
     public void testOscacheFilter() {
         String baseUrl = constructURL(BASE_PAGE);
 
-        // Connect to the page to allow the initial JSP compilation
-        compileJSP(baseUrl);
-        
         // Flush the cache to avoid getting refreshed content from previous tests
         flushCache();
 
      * Test the OSCache filter with fast requests
      */
     public void testOSCacheFilterFast() {
-        /*
         String baseUrl = constructURL(BASE_PAGE);
 
-        // Connect to the page to allow the initial JSP compilation
-        compileJSP(baseUrl);
-        
         for (int i = 0; i < 5; i++) {
             // Flush the cache to avoid getting refreshed content from previous tests
             flushCache();
             // build the url
             String url = baseUrl + "?i=" + i;
-            String response = invokeURL(url, 0);
+            String response = invokeURL(url, 500);
             for (int j = 0; j < 3; j++) {
-                String newResponse = invokeURL(url, 0);
+                String newResponse = invokeURL(url, 500);
                 assertTrue("new response " + newResponse + " should be the same to " + response, response.equals(newResponse));
             }
         }
-        */
     }
 
     /**