Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.net4j.tests')
-rw-r--r--plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF36
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java111
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java7
3 files changed, 18 insertions, 136 deletions
diff --git a/plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF
index ba461fda0c..4dc1fc8baa 100644
--- a/plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.net4j.tests;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -10,22 +10,22 @@ Bundle-Activator: org.eclipse.net4j.tests.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
- org.eclipse.net4j.tcp;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.net4j.jvm;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.net4j.http;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.net4j.http.server;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.net4j.defs;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.net4j.tcp;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.net4j.jvm;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.net4j.http;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.net4j.http.server;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.net4j.defs;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j.util.defs;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.junit;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.net4j.tests;version="3.1.0",
- org.eclipse.net4j.tests.apps;version="3.1.0",
- org.eclipse.net4j.tests.bugzilla;version="3.1.0",
- org.eclipse.net4j.tests.bundle;version="3.1.0";x-internal:=true,
- org.eclipse.net4j.tests.data;version="3.1.0",
- org.eclipse.net4j.tests.defs;version="3.1.0",
- org.eclipse.net4j.tests.signal;version="3.1.0",
- org.eclipse.net4j.util.tests;version="3.1.0",
- org.eclipse.net4j.util.tests.cache;version="3.1.0",
- org.eclipse.net4j.util.tests.defs;version="3.1.0",
- org.eclipse.net4j.util.tests.defs.impl;version="3.1.0",
- org.eclipse.net4j.util.tests.defs.util;version="3.1.0"
+Export-Package: org.eclipse.net4j.tests;version="4.0.0",
+ org.eclipse.net4j.tests.apps;version="4.0.0",
+ org.eclipse.net4j.tests.bugzilla;version="4.0.0",
+ org.eclipse.net4j.tests.bundle;version="4.0.0";x-internal:=true,
+ org.eclipse.net4j.tests.data;version="4.0.0",
+ org.eclipse.net4j.tests.defs;version="4.0.0",
+ org.eclipse.net4j.tests.signal;version="4.0.0",
+ org.eclipse.net4j.util.tests;version="4.0.0",
+ org.eclipse.net4j.util.tests.cache;version="4.0.0",
+ org.eclipse.net4j.util.tests.defs;version="4.0.0",
+ org.eclipse.net4j.util.tests.defs.impl;version="4.0.0",
+ org.eclipse.net4j.util.tests.defs.util;version="4.0.0"
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java
deleted file mode 100644
index b4f62654b1..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.acceptor.IAcceptor;
-import org.eclipse.net4j.signal.failover.IFailOverStrategy;
-import org.eclipse.net4j.signal.failover.NOOPFailOverStrategy;
-import org.eclipse.net4j.signal.failover.RetryFailOverStrategy;
-import org.eclipse.net4j.tests.signal.IntFailRequest;
-import org.eclipse.net4j.tests.signal.IntRequest;
-import org.eclipse.net4j.tests.signal.TestSignalProtocol;
-
-/**
- * @author Eike Stepper
- */
-public class FailOverTest extends AbstractProtocolTest
-{
- public FailOverTest()
- {
- }
-
- public void testFailingBefore() throws Exception
- {
- int data = 0x0a;
- startTransport();
- IFailOverStrategy failOverStrategy = new NOOPFailOverStrategy(getConnector());
- TestSignalProtocol protocol = new TestSignalProtocol(failOverStrategy);
-
- // Simulate a disconnect from the server.
- IAcceptor acceptor = getAcceptor();
- acceptor.close();
-
- // Exception HERE
- IntRequest request = new IntRequest(protocol, data);
- int result = request.send();
- assertEquals(data, result);
- }
-
- public void testFailingBeforeAndRetry() throws Exception
- {
- int data = 0x0a;
- startTransport();
- IFailOverStrategy failOverStrategy = new RetryFailOverStrategy(getConnector());
- TestSignalProtocol protocol = new TestSignalProtocol(failOverStrategy);
-
- // Simulate a disconnect from the server.
- IAcceptor acceptor = getAcceptor();
- acceptor.close();
-
- // new Thread()
- // {
- // @Override
- // public void run()
- // {
- // try
- // {
- // sleep(1000L);
- // restartContainer();
- // getAcceptor();
- // }
- // catch (Exception ex)
- // {
- // throw WrappedException.wrap(ex);
- // }
- // };
- // }.start();
-
- // Exception HERE
- IntRequest request = new IntRequest(protocol, data);
- int result = request.send();
- assertEquals(data, result);
- }
-
- public void testFailingDuring() throws Exception
- {
- int data = 0x0a;
- startTransport();
- IFailOverStrategy failOverStrategy = new RetryFailOverStrategy(getConnector());
- TestSignalProtocol protocol = new TestSignalProtocol(failOverStrategy);
-
- // Exception HERE
- IntRequest request = new IntRequest(protocol, data);
-
- // Simulate a disconnect from the server.
- IAcceptor acceptor = getAcceptor();
- acceptor.close();
-
- int result = request.send();
- assertEquals(data, result);
- }
-
- public void testFailingDuring2() throws Exception
- {
- int data = 0x0a;
- startTransport();
- IFailOverStrategy failOverStrategy = new RetryFailOverStrategy(getConnector());
- TestSignalProtocol protocol = new TestSignalProtocol(failOverStrategy);
-
- // Exception HERE
- int result = new IntFailRequest(protocol, data).send(1000);
- assertEquals(data, result);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
index d86cf05772..db4c51339b 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
@@ -13,7 +13,6 @@ package org.eclipse.net4j.tests.signal;
import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.signal.SignalReactor;
-import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.factory.ProductCreationException;
import org.eclipse.spi.net4j.ServerProtocolFactory;
@@ -48,12 +47,6 @@ public class TestSignalProtocol extends SignalProtocol<Object>
open(connector);
}
- public TestSignalProtocol(IFailOverStrategy failOverStrategy)
- {
- this();
- open(failOverStrategy);
- }
-
public TestSignalProtocol()
{
super(PROTOCOL_NAME);

Back to the top