Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java')
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java
index 00ccbe6940..dd125f02b2 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ExceptionRequest.java
@@ -14,29 +14,38 @@ import org.eclipse.net4j.signal.RequestWithConfirmation;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
/**
* @author Eike Stepper
*/
public class ExceptionRequest extends RequestWithConfirmation<Boolean>
{
- private boolean exceptionInIndicating;
+ private int phase;
- public ExceptionRequest(TestSignalProtocol protocol, boolean exceptionInIndicating)
+ public ExceptionRequest(TestSignalProtocol protocol, int phase)
{
super(protocol, TestSignalProtocol.SIGNAL_EXCEPTION);
- this.exceptionInIndicating = exceptionInIndicating;
+ this.phase = phase;
}
@Override
protected void requesting(ExtendedDataOutputStream out) throws Exception
{
- out.writeBoolean(exceptionInIndicating);
+ out.writeInt(phase);
+ if (phase == 1)
+ {
+ ((TestSignalProtocol)getProtocol()).throwException();
+ }
+
}
@Override
protected Boolean confirming(ExtendedDataInputStream in) throws Exception
{
+ if (phase == 4)
+ {
+ ((TestSignalProtocol)getProtocol()).throwException();
+ }
+
return in.readBoolean();
}
}

Back to the top