Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorslewis2014-10-14 17:55:07 -0400
committerslewis2014-10-14 17:55:07 -0400
commit9ab0c39f091cae1abab806bf104f7e911fabaf56 (patch)
treedac4636385f29afe910e498c457ff9d0e3a22029 /tests
parent194b6887237a00b6be8c4614babffa4fce6cc18c (diff)
downloadorg.eclipse.ecf-9ab0c39f091cae1abab806bf104f7e911fabaf56.tar.gz
org.eclipse.ecf-9ab0c39f091cae1abab806bf104f7e911fabaf56.tar.xz
org.eclipse.ecf-9ab0c39f091cae1abab806bf104f7e911fabaf56.zip
Fixed filetransfer tests by removing new ScpBrowseTest (accidently added
in previous commit) and moving to org.eclipse.ecf.tests.provider.filetransfer.scp Change-Id: Idc0cba18987f4eab4452d4133396093e44ee64f9
Diffstat (limited to 'tests')
-rw-r--r--tests/bundles/org.eclipse.ecf.tests.filetransfer/META-INF/MANIFEST.MF2
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF5
-rw-r--r--tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/src/org/eclipse/ecf/tests/provider/filetransfer/scp/ScpFileBrowseTest.java (renamed from tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/ScpFileBrowseTest.java)37
3 files changed, 20 insertions, 24 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.filetransfer/META-INF/MANIFEST.MF b/tests/bundles/org.eclipse.ecf.tests.filetransfer/META-INF/MANIFEST.MF
index 497257df4..0276c9190 100644
--- a/tests/bundles/org.eclipse.ecf.tests.filetransfer/META-INF/MANIFEST.MF
+++ b/tests/bundles/org.eclipse.ecf.tests.filetransfer/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.tests.filetransfer;singleton:=true
-Bundle-Version: 2.0.100.qualifier
+Bundle-Version: 2.0.200.qualifier
Bundle-Activator: org.eclipse.ecf.tests.filetransfer.Activator
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF
index c7359ce80..ea330239e 100755
--- a/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SCP Provider Tests
Bundle-SymbolicName: org.eclipse.ecf.tests.provider.filetransfer.scp
-Bundle-Version: 2.0.0.qualifier
+Bundle-Version: 2.1.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.tests.provider.filetransfer.scp.Activator
Bundle-Vendor: Eclipse.org
Bundle-Localization: plugin
@@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ecf,
org.eclipse.ecf.filetransfer,
org.eclipse.ecf.tests,
- org.junit
+ org.junit,
+ org.eclipse.ecf.tests.filetransfer
Eclipse-LazyStart: true
Export-Package: org.eclipse.ecf.internal.tests.provider.filetransfer.scp;x-internal:=true,
org.eclipse.ecf.tests.provider.filetransfer.scp
diff --git a/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/ScpFileBrowseTest.java b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/src/org/eclipse/ecf/tests/provider/filetransfer/scp/ScpFileBrowseTest.java
index de582fabd..e7632b6ec 100644
--- a/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/ScpFileBrowseTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.filetransfer.scp/src/org/eclipse/ecf/tests/provider/filetransfer/scp/ScpFileBrowseTest.java
@@ -9,7 +9,7 @@
* CohesionForce Inc - initial API and implementation
*******************************************************************************/
-package org.eclipse.ecf.tests.filetransfer;
+package org.eclipse.ecf.tests.provider.filetransfer.scp;
import java.io.File;
import java.net.URL;
@@ -17,10 +17,10 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-
import org.eclipse.ecf.core.security.ConnectContextFactory;
import org.eclipse.ecf.core.security.IConnectContext;
import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemBrowseEvent;
+import org.eclipse.ecf.tests.filetransfer.AbstractBrowseTestCase;
public class ScpFileBrowseTest extends AbstractBrowseTestCase {
@@ -31,29 +31,27 @@ public class ScpFileBrowseTest extends AbstractBrowseTestCase {
// Using a countdown latch to wait until we get the proper number
// of browse results
CountDownLatch latch = new CountDownLatch(1);
-
+
String username;
-
+
protected void setUp() throws Exception {
super.setUp();
- IConnectContext cctx;
- username = System.getProperty("user.name");
- cctx = ConnectContextFactory.createUsernamePasswordConnectContext(
- username, null);
+ username = System.getProperty("user.name"); //$NON-NLS-1$
+ IConnectContext cctx = ConnectContextFactory.createUsernamePasswordConnectContext(username, null);
this.adapter.setConnectContextForAuthentication(cctx);
roots = File.listRoots();
- final List files = new ArrayList();
+ List fList = new ArrayList();
for (int i = 0; i < roots.length; i++) {
final File[] fs = roots[i].listFiles();
if (fs != null)
for (int j = 0; j < fs.length; j++) {
if (fs[j].exists())
- files.add(fs[j]);
+ fList.add(fs[j]);
}
}
- this.files = (File[]) files.toArray(new File[] {});
+ this.files = (File[]) fList.toArray(new File[] {});
}
protected void tearDown() throws Exception {
@@ -66,12 +64,11 @@ public class ScpFileBrowseTest extends AbstractBrowseTestCase {
latch = new CountDownLatch(roots.length);
for (int i = 0; i < roots.length; i++) {
if (roots[i].exists()) {
- URL url = new URL("scp://"+username+"@localhost:"
- + roots[i].getAbsolutePath());
- System.out.println("Browsing: " + url);
+ URL url = new URL("scp://" + username + "@localhost:" + roots[i].getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("Browsing: " + url); //$NON-NLS-1$
testBrowse(url);
} else {
- System.out.println("Skipping: " + roots[i].toString());
+ System.out.println("Skipping: " + roots[i].toString()); //$NON-NLS-1$
latch.countDown();
}
// Need to sleep to give the connection time to close out
@@ -80,9 +77,8 @@ public class ScpFileBrowseTest extends AbstractBrowseTestCase {
assertTrue(latch.await(60, TimeUnit.SECONDS));
}
- @Override
protected void handleFileSystemBrowseEvent(IRemoteFileSystemBrowseEvent event) {
- trace("handleFileSystemBrowseEvent(" + event + ")");
+ trace("handleFileSystemBrowseEvent(" + event + ")"); //$NON-NLS-1$ //$NON-NLS-2$
if (event.getException() != null) {
trace(event.getException().toString());
}
@@ -93,12 +89,11 @@ public class ScpFileBrowseTest extends AbstractBrowseTestCase {
latch = new CountDownLatch(files.length);
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory() && files[i].exists()) {
- URL url = new URL("scp://"+username+"@localhost:"
- + files[i].getAbsolutePath());
- System.out.println("Browsing: " + url);
+ URL url = new URL("scp://" + username + "@localhost:" + files[i].getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("Browsing: " + url); //$NON-NLS-1$
testBrowse(url);
} else {
- System.out.println("Skipping: " + files[i].toString());
+ System.out.println("Skipping: " + files[i].toString()); //$NON-NLS-1$
latch.countDown();
}
// Need to sleep to give the connection time to close out

Back to the top