Author: dgolovin
Date: 2010-06-03 20:44:40 -0400 (Thu, 03 Jun 2010)
New Revision: 22535
Added:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/libs/
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/libs/some.jar
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/build.properties
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java
Log:
https://jira.jboss.org/browse/JBDS-1202 problems running tests
archives.test freeze fix
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/build.properties
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/build.properties 2010-06-03
22:35:23 UTC (rev 22534)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/build.properties 2010-06-04
00:44:40 UTC (rev 22535)
@@ -4,7 +4,8 @@
inputs/,\
expectedOutputs/,\
tmp/,\
- plugin.properties
+ plugin.properties,\
+ libs/
jars.compile.order = .
source.. = src/
output.. = bin/
Added: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/libs/some.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/libs/some.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java
===================================================================
---
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java 2010-06-03
22:35:23 UTC (rev 22534)
+++
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java 2010-06-04
00:44:40 UTC (rev 22535)
@@ -65,7 +65,7 @@
}
proj = ResourcesUtils.importProject("org.jboss.ide.eclipse.archives.test",
"/inputs/projects/GenericProject");
- proj.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+// proj.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
}
protected void tearDown() throws Exception {
ResourcesUtils.deleteProject(proj.getName());
@@ -252,42 +252,26 @@
IClasspathEntry e =
JavaCore.newLibraryEntry(new Path(file.getAbsolutePath()), null, null);
JavaModelManager.getUserLibraryManager().setUserLibrary(
- "userLibTest", new IClasspathEntry[] { e }, false);
- try {
- IArchive zipped = createArchive("zipped.war", new
Path(proj.getName()).append("outputs").makeAbsolute().toString());
- zipped.setInWorkspace(true);
- zipped.setExploded(false);
- ModelTruezipBridge.createFile(zipped);
- File zippedF =
proj.getLocation().append("outputs").append("zipped.war").toFile();
- assertTrue(zippedF.exists());
- assertTrue(!zippedF.isDirectory());
+ "userLibTest", new IClasspathEntry[] { e }, false);
+ IArchive zipped = createArchive("zipped.war", new
Path(proj.getName()).append("outputs").makeAbsolute().toString());
+ zipped.setInWorkspace(true);
+ zipped.setExploded(false);
+ ModelTruezipBridge.createFile(zipped);
+ File zippedF =
proj.getLocation().append("outputs").append("zipped.war").toFile();
+ assertTrue(zippedF.exists());
+ assertTrue(!zippedF.isDirectory());
- IArchiveFileSet fs = createLibFileSet("userLibTest");
- zipped.addChild(fs);
- ModelTruezipBridge.fullFilesetBuild(fs, new NullProgressMonitor(), true);
+ IArchiveFileSet fs = createLibFileSet("userLibTest");
+ zipped.addChild(fs);
+ ModelTruezipBridge.fullFilesetBuild(fs, new NullProgressMonitor(), true);
- // should be two less files and 3 less folders created
- assertEquals(1, countEntries(zippedF));
- } finally {
- JavaModelManager.getUserLibraryManager().removeUserLibrary("userLibTest");
- }
+ // should be two less files and 3 less folders created
+ assertEquals(1, countEntries(zippedF));
}
}
protected File findSomeJar() {
- String loc = System.getProperty("osgi.syspath");
- File f = new File(loc);
- String[] children = f.list();
- boolean found = false;
- int i = 0;
- File tempFile;
- while( !found && i < children.length) {
- tempFile = new File(f, children[i]);
- if( tempFile.exists() && tempFile.isFile() &&
children[i].endsWith("jar")) {
- return tempFile;
- }
- }
- return null;
+ return bundlePath.append("libs").append("some.jar").toFile();
}
protected IArchiveNode getDummyParent() {