commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1198993 - /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
Date Mon, 07 Nov 2011 23:05:48 GMT
Author: ggregory
Date: Mon Nov  7 23:05:48 2011
New Revision: 1198993

URL: http://svn.apache.org/viewvc?rev=1198993&view=rev
Log:
Don't start an embedded FTP server if TEST_URI is specified on the command line.

Modified:
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java?rev=1198993&r1=1198992&r2=1198993&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
Mon Nov  7 23:05:48 2011
@@ -59,6 +59,11 @@ public class FtpProviderTestCase extends
 
     private static final String USER_PROP_RES = "org.apache.ftpserver/users.properties";
 
+    private static String getSystemTestUriOverride()
+    {
+        return System.getProperty(TEST_URI);
+    }
+
     /**
      * Creates and starts an embedded Apache FTP Server (MINA).
      * 
@@ -104,7 +109,10 @@ public class FtpProviderTestCase extends
             @Override
             protected void setUp() throws Exception
             {
-                setUpClass();
+                if (getSystemTestUriOverride() == null)
+                {
+                    setUpClass();
+                }
                 super.setUp();
             }
 
@@ -134,7 +142,7 @@ public class FtpProviderTestCase extends
     @Override
     public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception
     {
-        String uri = System.getProperty(TEST_URI);
+        String uri = getSystemTestUriOverride();
         if (uri == null)
         {
             uri = DEFAULT_URI;



Mime
View raw message