[jboss-cvs] JBossAS SVN: r101154 - projects/vfs/branches/Branch_2_2/src/test/java/org/jboss/test/virtual/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 19 06:46:57 EST 2010


Author: alesj
Date: 2010-02-19 06:46:56 -0500 (Fri, 19 Feb 2010)
New Revision: 101154

Modified:
   projects/vfs/branches/Branch_2_2/src/test/java/org/jboss/test/virtual/test/SymlinkTestCase.java
Log:
More config.

Modified: projects/vfs/branches/Branch_2_2/src/test/java/org/jboss/test/virtual/test/SymlinkTestCase.java
===================================================================
--- projects/vfs/branches/Branch_2_2/src/test/java/org/jboss/test/virtual/test/SymlinkTestCase.java	2010-02-19 11:38:18 UTC (rev 101153)
+++ projects/vfs/branches/Branch_2_2/src/test/java/org/jboss/test/virtual/test/SymlinkTestCase.java	2010-02-19 11:46:56 UTC (rev 101154)
@@ -50,6 +50,7 @@
 {
    private String testPath;
    private String testName;
+   private boolean useEditor;
 
    public SymlinkTestCase(String name)
    {
@@ -77,11 +78,12 @@
 
       // setup symlink dir and test path!
 
-      //System.setProperty("test.dir", "/Users/alesj/projects/jboss6/trunk"); // plain path
-      System.setProperty("test.dir", "/Users/alesj/jboss"); // -- this is symlink
+      System.setProperty("test.dir", "/Users/alesj/projects/jboss6/trunk"); // plain path
+      //System.setProperty("test.dir", "/Users/alesj/jboss"); // -- this is symlink
 
       testPath = "/testsuite/output/lib/jboss-seam-booking.ear/jboss-seam.jar/org/jboss/seam/Seam.class";
       testName = "jboss-seam.jar";
+      useEditor = true;
    }
 
    @Override
@@ -114,10 +116,18 @@
       VFSCacheFactory.setInstance(cache);
       try
       {
-         URLEditor editor = new URLEditor();
          String rootText = StringPropertyReplacer.replaceProperties("${test.dir}");
-         editor.setAsText(rootText);
-         URL rootURL = (URL) editor.getValue();
+         URL rootURL;
+         if (useEditor)
+         {
+            URLEditor editor = new URLEditor();
+            editor.setAsText(rootText);
+            rootURL = (URL) editor.getValue();
+         }
+         else
+         {
+            rootURL = new URL("file://" + rootText);
+         }
          VFS vfs = VFS.getVFS(rootURL);
          VFSUtils.enableCopy(vfs);
          TrackingTempStore store = new TrackingTempStore(new MockTempStore(new Random().nextLong()));




More information about the jboss-cvs-commits mailing list