Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2009-04-09 15:33:25 +0000
committerPascal Rapicault2009-04-09 15:33:25 +0000
commit36233908293d95192b69ca94a4c815b5a423085e (patch)
treea36808bbd71e0db7a3f45082bfe53112c773dce1 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact
parent6dc095d52bcf7a11bf504ec4969d8654b88e3784 (diff)
downloadrt.equinox.p2-36233908293d95192b69ca94a4c815b5a423085e.tar.gz
rt.equinox.p2-36233908293d95192b69ca94a4c815b5a423085e.tar.xz
rt.equinox.p2-36233908293d95192b69ca94a4c815b5a423085e.zip
Bug 266141 - Timeout exception are converted into MD5 hash mismatch error
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java
index cd3955ed1..c9c63a89b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java
@@ -211,4 +211,55 @@ public class ProcessingStepHandlerTest extends TestCase {
assertTrue(Arrays.equals(new byte[] {4, 6, 8, 10, 12}, result.toByteArray()));
}
+ public void testPSHgetStatusOK() {
+ ProcessingStep ok1, ok2;
+ ok1 = new ProcessingStep() {
+ public IStatus getStatus() {
+ return Status.OK_STATUS;
+ }
+ };
+ ok2 = new ProcessingStep() {
+ public IStatus getStatus() {
+ return Status.OK_STATUS;
+ }
+ };
+
+ OutputStream testStream = handler.link(new ProcessingStep[] {ok1, ok2}, null, monitor);
+ IStatus status = ProcessingStepHandler.getStatus(testStream);
+ IStatus errStatus = ProcessingStepHandler.getStatus(testStream);
+ assertTrue(status.isOK() && errStatus.isOK());
+ assertTrue(!status.isMultiStatus());
+ assertTrue(!errStatus.isMultiStatus());
+ }
+
+ public void testPSHgetStatus() {
+ ProcessingStep ok, info, warning, error;
+ ok = new ProcessingStep() {
+ public IStatus getStatus() {
+ return Status.OK_STATUS;
+ }
+ };
+
+ info = new ProcessingStep() {
+ public IStatus getStatus() {
+ return new Status(IStatus.INFO, "ID", "INFO");
+ }
+ };
+
+ warning = new ProcessingStep() {
+ public IStatus getStatus() {
+ return new Status(IStatus.WARNING, "ID", "WARNING");
+ }
+ };
+
+ error = new ProcessingStep() {
+ public IStatus getStatus() {
+ return new Status(IStatus.ERROR, "ID", "ERROR");
+ }
+ };
+
+ OutputStream testStream = handler.link(new ProcessingStep[] {info, ok, error, warning}, null, monitor);
+ assertTrue(ProcessingStepHandler.getErrorStatus(testStream).getChildren().length == 2);
+ assertTrue(ProcessingStepHandler.getStatus(testStream, true).getChildren().length == 4);
+ }
}

Back to the top