Author: ecki
Date: Thu Sep 24 17:47:21 2015
New Revision: 1705120
URL: http://svn.apache.org/viewvc?rev=1705120&view=rev
Log:
[VFS-582}[tests] revert getTestDirectoryFile rename.
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/DefaultFilesCacheTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/LRUFilesCacheTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/SoftRefFilesCacheTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/WeakRefFilesCacheTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTests.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/VfsClassLoaderTests.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/hdfs/test/HdfsFileProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/http/test/HttpProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/JarProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/NestedJarTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/local/test/LocalProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/res/test/ResourceProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTarTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTbz2TestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTgzTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/Tbz2ProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TgzProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/temp/test/TemporaryProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/JunctionTests.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/VirtualProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlHttpProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderHttpTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/webdav/test/WebdavProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/NestedZipTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/ZipProviderTestCase.java
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/FileSystemManagerFactoryTestCase.java
commons/proper/vfs/trunk/src/changes/changes.xml
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
Thu Sep 24 17:47:21 2015
@@ -74,9 +74,9 @@ public abstract class AbstractVfsTestCas
*
* @param name path of the resource, relative to this test's base
directory.
*/
- public static File getTestResourceFile(final String name)
+ public static File getTestResource(final String name)
{
- return getTestResourceFile(name, true);
+ return getTestResource(name, true);
}
/**
@@ -84,9 +84,9 @@ public abstract class AbstractVfsTestCas
*
* @param name path of the resource, relative to this test's base
directory.
*/
- public static File getTestResourceFile(final String name, final boolean
mustExist)
+ public static File getTestResource(final String name, final boolean
mustExist)
{
- File file = new File(getTestDirectory(), name);
+ File file = new File(getTestDirectoryFile(), name);
file = getCanonicalFile(file);
if (mustExist)
{
@@ -103,11 +103,11 @@ public abstract class AbstractVfsTestCas
/**
* Locates the base directory for this test.
*/
- public static File getTestDirectory()
+ public static File getTestDirectoryFile()
{
if (baseDir == null)
{
- final String baseDirProp = getTestDirectoryString();
+ final String baseDirProp = getTestDirectory();
// the directory maybe expressed as URI in certain environments
if (baseDirProp.startsWith("file://")) {
try {
@@ -124,15 +124,17 @@ public abstract class AbstractVfsTestCas
/**
* Returns the test directory as a String.
+ * <p>
+ * {@link #getTestDirectoryFile()} should be preferred.
*
* @return the test directory as a String
*/
- public static String getTestDirectoryString()
+ public static String getTestDirectory()
{
return System.getProperty("test.basedir",
"target/test-classes/test-data");
}
- public static String getResourceTestDirectoryString()
+ public static String getResourceTestDirectory()
{
return System.getProperty("test.basedir.res", "test-data");
}
@@ -144,7 +146,7 @@ public abstract class AbstractVfsTestCas
*/
public static File getTestDirectory(final String name)
{
- File file = new File(getTestDirectory(), name);
+ File file = new File(getTestDirectoryFile(), name);
file = getCanonicalFile(file);
assertTrue("Test directory \"" + file + "\" does not exist or is not a
directory.",
file.isDirectory() || file.mkdirs());
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/DefaultFilesCacheTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/DefaultFilesCacheTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/DefaultFilesCacheTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/DefaultFilesCacheTestCase.java
Thu Sep 24 17:47:21 2015
@@ -51,7 +51,7 @@ public class DefaultFilesCacheTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File testDir = AbstractVfsTestCase.getTestDirectory();
+ final File testDir = AbstractVfsTestCase.getTestDirectoryFile();
return manager.toFileObject(testDir);
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/LRUFilesCacheTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/LRUFilesCacheTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/LRUFilesCacheTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/LRUFilesCacheTestCase.java
Thu Sep 24 17:47:21 2015
@@ -51,7 +51,7 @@ public class LRUFilesCacheTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File testDir = AbstractVfsTestCase.getTestDirectory();
+ final File testDir = AbstractVfsTestCase.getTestDirectoryFile();
return manager.toFileObject(testDir);
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTestCase.java
Thu Sep 24 17:47:21 2015
@@ -51,7 +51,7 @@ public class NullFilesCacheTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File testDir = AbstractVfsTestCase.getTestDirectory();
+ final File testDir = AbstractVfsTestCase.getTestDirectoryFile();
return manager.toFileObject(testDir);
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/SoftRefFilesCacheTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/SoftRefFilesCacheTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/SoftRefFilesCacheTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/SoftRefFilesCacheTestCase.java
Thu Sep 24 17:47:21 2015
@@ -51,7 +51,7 @@ public class SoftRefFilesCacheTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File testDir = AbstractVfsTestCase.getTestDirectory();
+ final File testDir = AbstractVfsTestCase.getTestDirectoryFile();
return manager.toFileObject(testDir);
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/WeakRefFilesCacheTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/WeakRefFilesCacheTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/WeakRefFilesCacheTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/cache/WeakRefFilesCacheTestCase.java
Thu Sep 24 17:47:21 2015
@@ -51,7 +51,7 @@ public class WeakRefFilesCacheTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File testDir = AbstractVfsTestCase.getTestDirectory();
+ final File testDir = AbstractVfsTestCase.getTestDirectoryFile();
return manager.toFileObject(testDir);
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTests.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTests.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTests.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/DefaultFileMonitorTests.java
Thu Sep 24 17:47:21 2015
@@ -42,7 +42,7 @@ public class DefaultFileMonitorTests ext
{
super.setUp();
fsManager = VFS.getManager();
- testDir = AbstractVfsTestCase.getTestDirectory();
+ testDir = AbstractVfsTestCase.getTestDirectoryFile();
changeStatus = 0;
testFile = new File(testDir, "testReload.properties");
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/VfsClassLoaderTests.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/VfsClassLoaderTests.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/VfsClassLoaderTests.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/impl/test/VfsClassLoaderTests.java
Thu Sep 24 17:47:21 2015
@@ -108,7 +108,7 @@ public class VfsClassLoaderTests
public void testGetResourcesJARs() throws Exception
{
final FileSystemManager manager = getManager();
- final File baseDir = AbstractVfsTestCase.getTestDirectory();
+ final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
// make sure the provider config is useable
if (baseDir == null || manager == null || !baseDir.isDirectory())
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=1705120&r1=1705119&r2=1705120&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
Thu Sep 24 17:47:21 2015
@@ -103,7 +103,7 @@ public class FtpProviderTestCase extends
final BaseUser user = (BaseUser) userManager.getUserByName("test");
// Pickup the home dir value at runtime even though we have it set in
the user prop file
// The user prop file requires the "homedirectory" to be set
- user.setHomeDirectory(getTestDirectoryString());
+ user.setHomeDirectory(getTestDirectory());
serverFactory.setUserManager(userManager);
final ListenerFactory factory = new ListenerFactory();
// set the port of the listener
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftps/test/AbstractFtpsProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -108,7 +108,7 @@ abstract class AbstractFtpsProviderTestC
final BaseUser user = (BaseUser) userManager.getUserByName("test");
// Pickup the home dir value at runtime even though we have it set in
the user prop file
// The user prop file requires the "homedirectory" to be set
- user.setHomeDirectory(getTestDirectoryString());
+ user.setHomeDirectory(getTestDirectory());
serverFactory.setUserManager(userManager);
final ListenerFactory factory = new ListenerFactory();
// set the port of the listener
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/hdfs/test/HdfsFileProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/hdfs/test/HdfsFileProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/hdfs/test/HdfsFileProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/hdfs/test/HdfsFileProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -120,7 +120,7 @@ public class HdfsFileProviderTestCase ex
// Copy the test directory into HDFS
final Path base = new Path("/test-data");
assertTrue("Unable to create base directory", hdfs.mkdirs(base));
- final File testDir = AbstractVfsTestCase.getTestDirectory();
+ final File testDir = AbstractVfsTestCase.getTestDirectoryFile();
copyTestResources(testDir, base);
super.setUp();
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/http/test/HttpProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/http/test/HttpProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/http/test/HttpProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/http/test/HttpProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -66,7 +66,7 @@ public class HttpProviderTestCase extend
private static void setUpClass() throws Exception
{
Server = new NHttpServer();
- if (!Server.run(SocketPort, new File(getTestDirectoryString()), 5000))
+ if (!Server.run(SocketPort, new File(getTestDirectory()), 5000))
{
throw new IllegalStateException("The embedded HTTP server has not
completed startup, increase wait time");
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/JarProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/JarProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/JarProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/JarProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -36,7 +36,7 @@ public class JarProviderTestCase extends
{
static FileObject getTestJar(final FileSystemManager manager, final String
name) throws Exception
{
- final File jarFile = AbstractVfsTestCase.getTestResourceFile(name);
+ final File jarFile = AbstractVfsTestCase.getTestResource(name);
final String uri = "jar:file:" + jarFile.getAbsolutePath() + "!/";
return manager.resolveFile(uri);
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/NestedJarTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/NestedJarTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/NestedJarTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/jar/test/NestedJarTestCase.java
Thu Sep 24 17:47:21 2015
@@ -62,7 +62,7 @@ public class NestedJarTestCase
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
// Locate the Jar file
- final File outerFile =
AbstractVfsTestCase.getTestResourceFile("nested.jar");
+ final File outerFile =
AbstractVfsTestCase.getTestResource("nested.jar");
final String uri = "jar:file:" + outerFile.getAbsolutePath() +
"!/test.jar";
final FileObject jarFile = manager.resolveFile(uri);
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/local/test/LocalProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/local/test/LocalProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/local/test/LocalProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/local/test/LocalProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -62,7 +62,7 @@ public class LocalProviderTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File testDir = AbstractVfsTestCase.getTestDirectory();
+ final File testDir = AbstractVfsTestCase.getTestDirectoryFile();
return manager.toFileObject(testDir);
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ram/test/RamProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -85,7 +85,7 @@ public class RamProviderTestCase extends
// Import the test tree
final FileObject fo = manager.resolveFile("ram:/");
final RamFileSystem fs = (RamFileSystem) fo.getFileSystem();
- fs.importTree(getTestDirectory());
+ fs.importTree(getTestDirectoryFile());
fo.close();
inited=true;
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/res/test/ResourceProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/res/test/ResourceProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/res/test/ResourceProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/res/test/ResourceProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -58,7 +58,7 @@ public class ResourceProviderTestCase ex
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final String baseDir =
AbstractVfsTestCase.getResourceTestDirectoryString();
+ final String baseDir = AbstractVfsTestCase.getResourceTestDirectory();
return manager.resolveFile("res:" + baseDir);
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -109,7 +109,7 @@ public class SftpProviderTestCase extend
{
return null;
}
- return new
TestFileSystemView(AbstractVfsTestCase.getTestDirectoryString(), userName);
+ return new
TestFileSystemView(AbstractVfsTestCase.getTestDirectory(), userName);
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTarTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTarTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTarTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTarTestCase.java
Thu Sep 24 17:47:21 2015
@@ -61,7 +61,7 @@ public class NestedTarTestCase
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
// Locate the base Tar file
- final String tarFilePath =
AbstractVfsTestCase.getTestResourceFile("nested.tar").getAbsolutePath();
+ final String tarFilePath =
AbstractVfsTestCase.getTestResource("nested.tar").getAbsolutePath();
final String uri = "tar:file:" + tarFilePath + "!/test.tar";
final FileObject tarFile = manager.resolveFile(uri);
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTbz2TestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTbz2TestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTbz2TestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTbz2TestCase.java
Thu Sep 24 17:47:21 2015
@@ -61,7 +61,7 @@ public class NestedTbz2TestCase
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
// Locate the base Tar file
- final String tarFilePath =
AbstractVfsTestCase.getTestResourceFile("nested.tbz2").getAbsolutePath();
+ final String tarFilePath =
AbstractVfsTestCase.getTestResource("nested.tbz2").getAbsolutePath();
final String uri = "tbz2:file:" + tarFilePath + "!/test.tbz2";
final FileObject tarFile = manager.resolveFile(uri);
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTgzTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTgzTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTgzTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/NestedTgzTestCase.java
Thu Sep 24 17:47:21 2015
@@ -61,7 +61,7 @@ public class NestedTgzTestCase
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
// Locate the base Tar file
- final String tarFilePath =
AbstractVfsTestCase.getTestResourceFile("nested.tgz").getAbsolutePath();
+ final String tarFilePath =
AbstractVfsTestCase.getTestResource("nested.tgz").getAbsolutePath();
final String uri = "tgz:file:" + tarFilePath + "!/test.tgz";
final FileObject tarFile = manager.resolveFile(uri);
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TarProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -60,7 +60,7 @@ public class TarProviderTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File tarFile =
AbstractVfsTestCase.getTestResourceFile("test.tar");
+ final File tarFile = AbstractVfsTestCase.getTestResource("test.tar");
final String uri = "tar:file:" + tarFile.getAbsolutePath() + "!/";
return manager.resolveFile(uri);
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/Tbz2ProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/Tbz2ProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/Tbz2ProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/Tbz2ProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -60,7 +60,7 @@ public class Tbz2ProviderTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File tarFile =
AbstractVfsTestCase.getTestResourceFile("test.tbz2");
+ final File tarFile = AbstractVfsTestCase.getTestResource("test.tbz2");
final String uri = "tbz2:file:" + tarFile.getAbsolutePath() + "!/";
return manager.resolveFile(uri);
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TgzProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TgzProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TgzProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/tar/test/TgzProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -61,7 +61,7 @@ public class TgzProviderTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File tarFile =
AbstractVfsTestCase.getTestResourceFile("test.tgz");
+ final File tarFile = AbstractVfsTestCase.getTestResource("test.tgz");
final String uri = "tgz:file:" + tarFile.getAbsolutePath() + "!/";
return manager.resolveFile(uri);
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/temp/test/TemporaryProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/temp/test/TemporaryProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/temp/test/TemporaryProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/temp/test/TemporaryProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -51,7 +51,7 @@ public class TemporaryProviderTestCase
public void prepare(final DefaultFileSystemManager manager)
throws Exception
{
- final File baseDir = AbstractVfsTestCase.getTestDirectory();
+ final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
manager.addProvider("tmp", new TemporaryFileProvider(baseDir));
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/JunctionTests.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/JunctionTests.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/JunctionTests.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/JunctionTests.java
Thu Sep 24 17:47:21 2015
@@ -32,7 +32,7 @@ public class JunctionTests
{
private FileObject getBaseDir() throws FileSystemException
{
- final File file = AbstractVfsTestCase.getTestDirectory();
+ final File file = AbstractVfsTestCase.getTestDirectoryFile();
assertTrue(file.exists());
return getManager().toFileObject(file);
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/VirtualProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/VirtualProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/VirtualProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/test/VirtualProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -45,7 +45,7 @@ public class VirtualProviderTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File baseDir = AbstractVfsTestCase.getTestDirectory();
+ final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
final FileObject baseFile = manager.toFileObject(baseDir);
return manager.createVirtualFileSystem(baseFile);
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlHttpProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlHttpProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlHttpProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlHttpProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -56,7 +56,7 @@ public class UrlHttpProviderTestCase
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File baseDir = AbstractVfsTestCase.getTestDirectory();
+ final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
return manager.resolveFile(baseDir.toURI().toURL().toExternalForm());
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderHttpTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderHttpTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderHttpTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderHttpTestCase.java
Thu Sep 24 17:47:21 2015
@@ -60,7 +60,7 @@ public class UrlProviderHttpTestCase ext
private static void setUpClass() throws Exception
{
Server = new NHttpServer();
- if (!Server.run(SocketPort, new File(getTestDirectoryString()), 5000))
+ if (!Server.run(SocketPort, new File(getTestDirectory()), 5000))
{
throw new IllegalStateException("The embedded HTTP server has not
completed startup, increase wait time");
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -56,7 +56,7 @@ public class UrlProviderTestCase
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File baseDir = AbstractVfsTestCase.getTestDirectory();
+ final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
return manager.resolveFile(baseDir.toURI().toURL().toExternalForm());
}
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/webdav/test/WebdavProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/webdav/test/WebdavProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/webdav/test/WebdavProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/webdav/test/WebdavProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -241,7 +241,7 @@ public class WebdavProviderTestCase exte
RepoDirectory = createTempDirectory();
message("Created temp directory " + RepoDirectory);
// Populate repo
- importFiles(RepoDirectory, new File(getTestDirectoryString()));
+ importFiles(RepoDirectory, new File(getTestDirectory()));
dump(RepoDirectory);
// Start server with temp repo
startJackrabbit(RepoDirectory);
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/NestedZipTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/NestedZipTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/NestedZipTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/NestedZipTestCase.java
Thu Sep 24 17:47:21 2015
@@ -61,7 +61,7 @@ public class NestedZipTestCase
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
// Locate the base Zip file
- final String zipFilePath =
AbstractVfsTestCase.getTestResourceFile("nested.zip").getAbsolutePath();
+ final String zipFilePath =
AbstractVfsTestCase.getTestResource("nested.zip").getAbsolutePath();
final String uri = "zip:file:" + zipFilePath + "!/test.zip";
final FileObject zipFile = manager.resolveFile(uri);
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/ZipProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/ZipProviderTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/ZipProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/zip/test/ZipProviderTestCase.java
Thu Sep 24 17:47:21 2015
@@ -61,7 +61,7 @@ public class ZipProviderTestCase
@Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
- final File zipFile =
AbstractVfsTestCase.getTestResourceFile("test.zip");
+ final File zipFile = AbstractVfsTestCase.getTestResource("test.zip");
final String uri = "zip:file:" + zipFile.getAbsolutePath() + "!/";
return manager.resolveFile(uri);
}
Modified:
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/FileSystemManagerFactoryTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/FileSystemManagerFactoryTestCase.java?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
---
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/FileSystemManagerFactoryTestCase.java
(original)
+++
commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/FileSystemManagerFactoryTestCase.java
Thu Sep 24 17:47:21 2015
@@ -40,7 +40,7 @@ public class FileSystemManagerFactoryTes
final FileSystemManager manager = VFS.getManager();
// Lookup a test jar file
- final File jarFile = getTestResourceFile("test.jar");
+ final File jarFile = getTestResource("test.jar");
// File
final FileObject file = manager.toFileObject(jarFile);
check(manager, file);
Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1705120&r1=1705119&r2=1705120&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Thu Sep 24 17:47:21 2015
@@ -26,6 +26,9 @@
<!-- <action issue="VFS-443" dev="ggregory" type="update"
due-to="nickallen"> -->
<!-- [Local] Need an easy way to convert from a FileObject to a File.
-->
<!-- </action> -->
+ <action issue="VFS-582" dev="ecki" type="fix">
+ [tests] revert rename of getTestDirectoryFile to make test classes
more compatible for external providers.
+ </action>
<action issue="VFS-480" dev="ecki" type="fix">
Make startup of SoftRefsFileCache cleaner thread work and less racy to
avoid leaks.
</action>