You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by hu...@apache.org on 2006/07/07 14:40:07 UTC

svn commit: r419883 - in /incubator/woden/branches/WODEN-40/test/org/apache/woden/tests: W3CFileRepository.java W3CTestSuiteTest.java

Author: hughesj
Date: Fri Jul  7 05:40:06 2006
New Revision: 419883

URL: http://svn.apache.org/viewvc?rev=419883&view=rev
Log:
Code to speed up the W3CFileRepository tests. If you have CVS extracted the W3C test schemas to the downloads/w3c-cache directory then those will be used instead of downloading each file from W3C every time you run the tests. Note: this is not an XML catalog, just a quick hack to speed the tests up a bit. The network is still used for files not retrieved from W3C CVS and also for any files imported by the W3C tests with an absolute URL (if any of those imports actually exist!).

NOTE: the W3C public CVS tree is available under the W3C software license. Please see here for a link to the license: http://dev.w3.org/cvsweb/

To create a local cache of the W3C files do this:

cd <woden root dir>/downloads
mkdir w3c-cache
cvs -d:pserver:anonymous@dev.w3.org:/sources/public login
cvs -d:pserver:anonymous@dev.w3.org:/sources/public checkout 2002/ws/desc/test-suite/documents

run the Woden W3CTestSuiteTest as usual. I did a quick one-off comparison today and this improved the time to run the test from 38secs to 27secs. This will vary greatly depending on your network connection.

Note: if you run the tests and you haven't got a local cache, the tests will run as before direct from the cvsweb links.

Added:
    incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CFileRepository.java
Modified:
    incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CTestSuiteTest.java

Added: incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CFileRepository.java
URL: http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CFileRepository.java?rev=419883&view=auto
==============================================================================
--- incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CFileRepository.java (added)
+++ incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CFileRepository.java Fri Jul  7 05:40:06 2006
@@ -0,0 +1,67 @@
+/**
+ * Copyright 2006 Apache Software Foundation 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+package org.apache.woden.tests;
+
+import java.io.File;
+
+public class W3CFileRepository {
+
+    private String w3cBase = null;
+
+    private String localBase = null;
+
+    private boolean localCacheExists = false;
+
+    public W3CFileRepository(String w3cBaseLocation, String localBaseLocation) {
+        w3cBase = w3cBaseLocation;
+        localBase = localBaseLocation;
+
+        File loc = new File(localBase);
+        if (loc.exists() && loc.isDirectory()) {
+            localCacheExists = true;
+        }
+    }
+
+    /**
+     * Given a path of a file in the W3C CVS repository, return the path to the
+     * local cache of this file. If the file doesn't exist, it is retrieved and
+     * stored in the cache.
+     * 
+     * @param path
+     *            path of the file in the W3C CVS repository
+     * @return path to use to get the local file
+     */
+    public String getFilePath(String path) {
+        // If we don't have a cache return the server path
+        if (!localCacheExists) {
+            return path;
+        }
+
+        // If the path doesn't start with the base location then return the
+        // server path
+        if (!path.startsWith(w3cBase)) {
+            return path;
+        }
+
+        String localPath = localBase + path.substring(w3cBase.length());
+        File localFile = new File(localPath);
+        if (localFile.exists()) {
+            return localPath;
+        } else {
+            return path;
+        }
+    }
+}

Modified: incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CTestSuiteTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CTestSuiteTest.java?rev=419883&r1=419882&r2=419883&view=diff
==============================================================================
--- incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CTestSuiteTest.java (original)
+++ incubator/woden/branches/WODEN-40/test/org/apache/woden/tests/W3CTestSuiteTest.java Fri Jul  7 05:40:06 2006
@@ -21,7 +21,6 @@
 
 import org.apache.woden.WSDLFactory;
 import org.apache.woden.WSDLReader;
-import org.apache.woden.internal.ReaderFeatures;
 import org.apache.woden.wsdl20.xml.DescriptionElement;
 
 public class W3CTestSuiteTest extends TestCase 
@@ -29,6 +28,7 @@
   private WSDLFactory factory = null;
   private WSDLReader reader = null;
   private TestErrorHandler handler;
+  private W3CFileRepository wfr = null; 
 	  
   public static Test suite()
   {
@@ -37,6 +37,8 @@
 
   protected void setUp() throws Exception 
   {
+    wfr = new W3CFileRepository("http://dev.w3.org/cvsweb/~checkout~/",
+                                System.getProperty("user.dir") + "/downloads/w3c-cache/");
 	handler = new TestErrorHandler();
 
     try
@@ -70,7 +72,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Chameleon-1B/getBalance.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Chameleon-1B/getBalance.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  // TODO: determine the assertions that should fail for this test.
 	}
@@ -87,7 +89,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Chameleon-2B/getBalance.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Chameleon-2B/getBalance.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  // TODO: determine the assertions that should fail for this test.
 	}
@@ -104,7 +106,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Import-1B/XSDImport.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Import-1B/XSDImport.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -121,7 +123,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Import-2B/XSDImportInWSDL.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Import-2B/XSDImportInWSDL.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -138,7 +140,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Import-3B/XSDImport2.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Import-3B/XSDImport2.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -155,7 +157,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Interface-1B/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Interface-1B/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -172,7 +174,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Interface-2B/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Interface-2B/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -189,7 +191,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Interface-3B/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Interface-3B/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -206,7 +208,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-1B/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-1B/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -223,7 +225,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-2B/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-2B/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -240,7 +242,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-12B/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-12B/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -257,7 +259,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-13B/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-13B/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -274,7 +276,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-14B/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-14B/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -291,7 +293,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-15B/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/Service-15B/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -308,7 +310,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/TicketAgent-1B/TicketAgent-bad.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/bad/TicketAgent-1B/TicketAgent-bad.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
       // TODO: determine the assertions that should fail for this test.
 	}
@@ -331,7 +333,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-1G/getBalance.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-1G/getBalance.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Chameleon-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -348,7 +350,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-2G/getBalance.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-2G/getBalance.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Chameleon-2G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -365,7 +367,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-3G/getBalance.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-3G/getBalance.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Chameleon-3G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -382,7 +384,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-4G/getBalance.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-4G/getBalance.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Chameleon-4G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -399,7 +401,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/CreditCardFaults-1G/use-credit-card-faults.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/CreditCardFaults-1G/use-credit-card-faults.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good CreditCardFaults-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -416,7 +418,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/GreatH-1G/primer-hotelReservationService.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/GreatH-1G/primer-hotelReservationService.wsdl"), handler);
       assertTrue("number of binding elements isn't 1", desc.getBindingElements().length == 1);
       assertTrue("interfacename is null", desc.toComponent().getBindings()[0].getInterface()!=null);
 
@@ -436,7 +438,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Import-1G/XSDImport.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Import-1G/XSDImport.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Import-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -453,7 +455,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Import-2G/XSDImport2.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Import-2G/XSDImport2.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Import-2G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -470,7 +472,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/ImportedWSDL-1G/updateDetails.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/ImportedWSDL-1G/updateDetails.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good ImportedWSDL-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -487,7 +489,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-1G/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-1G/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Interface-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -504,7 +506,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-2G/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-2G/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Interface-2G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -521,7 +523,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-3G/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-3G/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Interface-3G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -538,7 +540,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-4G/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-4G/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Interface-4G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -555,7 +557,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-5G/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-5G/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Interface-5G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -572,7 +574,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-6G/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-6G/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Interface-6G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -589,7 +591,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-7G/Interface.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Interface-7G/Interface.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Interface-7G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -606,7 +608,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/MultipleInlineSchemas-1G/retrieveItems.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/MultipleInlineSchemas-1G/retrieveItems.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good MultipleInlineSchemas-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -623,7 +625,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/SchemaId-1G/schemaIds.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/SchemaId-1G/schemaIds.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good SchemaId-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -640,7 +642,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/SchemaLocationFragment-1G/Items.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/SchemaLocationFragment-1G/Items.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good SchemaLocationFragment-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -657,7 +659,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Service-1G/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Service-1G/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Service-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -674,7 +676,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Service-2G/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Service-2G/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Service-2G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -691,7 +693,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Service-3G/Service.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Service-3G/Service.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good Service-3G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -708,7 +710,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/ServiceReference-1G/reservationList.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/ServiceReference-1G/reservationList.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good ServiceReference-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -725,7 +727,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/ServiceReference-1G/reservationDetails.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/ServiceReference-1G/reservationDetails.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good ServiceReference-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -742,7 +744,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/TicketAgent-1G/TicketAgent.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/TicketAgent-1G/TicketAgent.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good TicketAgent-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -759,7 +761,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/WeathSvc-1G/WeathSvc.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/WeathSvc-1G/WeathSvc.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good WeathSvc-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -776,7 +778,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/XsImport-1G/reservation.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/XsImport-1G/reservation.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good XsImport-1G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -793,7 +795,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/XsImport-2G/reservationDetails.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/XsImport-2G/reservationDetails.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good XsImport-2G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}
@@ -810,7 +812,7 @@
   {
 	try
 	{
-	  DescriptionElement desc = reader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/XsImport-3G/reservationDetails.wsdl", handler);
+	  DescriptionElement desc = reader.readWSDL(wfr.getFilePath("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/XsImport-3G/reservationDetails.wsdl"), handler);
 	  assertNotNull("DescriptionElement is null.", desc);
 	  assertFalse("The good XsImport-3G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
 	}



---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


Re: svn commit: r419883 - in /incubator/woden/branches/WODEN-40/test/org/apache/woden/tests: W3CFileRepository.java W3CTestSuiteTest.java

Posted by Jeremy Hughes <jp...@gmail.com>.
On 7/7/06, hughesj@apache.org <hu...@apache.org> wrote:
> Author: hughesj
> Date: Fri Jul  7 05:40:06 2006
> New Revision: 419883
>
> URL: http://svn.apache.org/viewvc?rev=419883&view=rev
> Log:
> Code to speed up the W3CFileRepository tests. If you have CVS extracted the W3C test schemas to the downloads/w3c-cache directory then those will be used instead of downloading each file from W3C every time you run the tests. Note: this is not an XML catalog, just a quick hack to speed the tests up a bit. The network is still used for files not retrieved from W3C CVS and also for any files imported by the W3C tests with an absolute URL (if any of those imports actually exist!).
>
> NOTE: the W3C public CVS tree is available under the W3C software license. Please see here for a link to the license: http://dev.w3.org/cvsweb/
>
> To create a local cache of the W3C files do this:
>
> cd <woden root dir>/downloads
> mkdir w3c-cache

whoops missed a step here. do:

cd w3c-cache

> cvs -d:pserver:anonymous@dev.w3.org:/sources/public login
> cvs -d:pserver:anonymous@dev.w3.org:/sources/public checkout 2002/ws/desc/test-suite/documents
>
> run the Woden W3CTestSuiteTest as usual. I did a quick one-off comparison today and this improved the time to run the test from 38secs to 27secs. This will vary greatly depending on your network connection.
>
> Note: if you run the tests and you haven't got a local cache, the tests will run as before direct from the cvsweb links.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org