Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff McAffer2008-08-21 02:32:45 +0000
committerJeff McAffer2008-08-21 02:32:45 +0000
commitfab72cde75a1fc0ce39559c14468617455289241 (patch)
tree0018ee1b375f95709389b5413119a94611e6597a /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite
parent465fb2093530ad1f1279f76bd74c6ebebd1999a0 (diff)
downloadrt.equinox.p2-fab72cde75a1fc0ce39559c14468617455289241.tar.gz
rt.equinox.p2-fab72cde75a1fc0ce39559c14468617455289241.tar.xz
rt.equinox.p2-fab72cde75a1fc0ce39559c14468617455289241.zip
Integrating changes for adopting the publisherafter_publisher_integration
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java27
1 files changed, 5 insertions, 22 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java
index ba9f4d7fc..7b767d572 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java
@@ -10,7 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.updatesite;
-import java.io.*;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import junit.framework.Test;
@@ -456,27 +457,9 @@ public class UpdateSiteTest extends AbstractProvisioningTest {
IArtifactKey[] keys = artifactRepo.getArtifactKeys();
for (int i = 0; i < keys.length; i++) {
if (keys[i].getId().equals("Plugin240121")) {
- FileOutputStream fos = null;
- try {
- File tmp;
- try {
- tmp = File.createTempFile("p2.test", "test");
- tmp.deleteOnExit();
- fos = new FileOutputStream(tmp);
- } catch (IOException e1) {
- fail("Can't create temp file");
- }
- IStatus status = artifactRepo.getArtifact(artifactRepo.getArtifactDescriptors(keys[i])[0], fos, new NullProgressMonitor());
- if (!status.isOK())
- fail("Can't get the expected artifact:" + keys[i]);
- } finally {
- if (fos != null)
- try {
- fos.close();
- } catch (IOException e) {
- //ignore
- }
- }
+ IStatus status = artifactRepo.getArtifact(artifactRepo.getArtifactDescriptors(keys[i])[0], new ByteArrayOutputStream(500), new NullProgressMonitor());
+ if (!status.isOK())
+ fail("Can't get the expected artifact:" + keys[i]);
}
}
}

Back to the top