summaryrefslogtreecommitdiff
path: root/java/test
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2007-05-01 06:20:04 +0000
committerMatthew Newhook <matthew@zeroc.com>2007-05-01 06:20:04 +0000
commitabdbf8c3efbc4139062ce3cc220ea07dd5fbdf0f (patch)
treebc8023e87a4afef1d6f95091f250fb5f49ec4ed0 /java/test
parentremove timeout test from proxy test. (diff)
downloadice-abdbf8c3efbc4139062ce3cc220ea07dd5fbdf0f.tar.bz2
ice-abdbf8c3efbc4139062ce3cc220ea07dd5fbdf0f.tar.xz
ice-abdbf8c3efbc4139062ce3cc220ea07dd5fbdf0f.zip
remove timeout test from proxy test. Cleanup of operations test.
Diffstat (limited to 'java/test')
-rw-r--r--java/test/Ice/operations/Server.java4
-rw-r--r--java/test/Ice/operationsAMD/Server.java4
-rw-r--r--java/test/Ice/proxy/AllTests.java68
3 files changed, 2 insertions, 74 deletions
diff --git a/java/test/Ice/operations/Server.java b/java/test/Ice/operations/Server.java
index 61cdbd95402..83b6c48698a 100644
--- a/java/test/Ice/operations/Server.java
+++ b/java/test/Ice/operations/Server.java
@@ -14,9 +14,7 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = communicator.stringToIdentity("test");
- adapter.add(new MyDerivedClassI(adapter, id), id);
- adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context"));
+ adapter.add(new MyDerivedClassI(), communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/operationsAMD/Server.java b/java/test/Ice/operationsAMD/Server.java
index 5f5b6025992..07f4f92ec98 100644
--- a/java/test/Ice/operationsAMD/Server.java
+++ b/java/test/Ice/operationsAMD/Server.java
@@ -14,9 +14,7 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = communicator.stringToIdentity("test");
- adapter.add(new MyDerivedClassI(adapter, id), id);
- adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context"));
+ adapter.add(new MyDerivedClassI(), communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/proxy/AllTests.java b/java/test/Ice/proxy/AllTests.java
index c7331e484e2..7df5c53074f 100644
--- a/java/test/Ice/proxy/AllTests.java
+++ b/java/test/Ice/proxy/AllTests.java
@@ -9,48 +9,6 @@
public class AllTests
{
- static class AMI_MyClass_opSleepI extends Test.AMI_MyClass_opSleep
- {
- public void
- ice_response()
- {
- test(false);
- }
-
- synchronized public void
- ice_exception(Ice.LocalException ex)
- {
- assert(!_called);
- _called = true;
- notify();
- test(ex instanceof Ice.TimeoutException);
- }
-
- synchronized public boolean
- check()
- {
- while(!_called)
- {
- try
- {
- wait(5000);
- }
- catch(InterruptedException ex)
- {
- continue;
- }
-
- if(!_called)
- {
- return false; // Must be timeout.
- }
- }
- return true;
- }
-
- private boolean _called = false;
- };
-
private static void
test(boolean b)
{
@@ -466,32 +424,6 @@ public class AllTests
test(c.equals(c2));
System.out.println("ok");
- if(!collocated)
- {
- System.out.print("testing timeout... ");
- System.out.flush();
- Test.MyClassPrx clTimeout = Test.MyClassPrxHelper.uncheckedCast(cl.ice_timeout(500));
- try
- {
- clTimeout.opSleep(1000);
- test(false);
- }
- catch(Ice.TimeoutException ex)
- {
- }
- System.out.println("ok");
-
- AMI_MyClass_opSleepI cb = new AMI_MyClass_opSleepI();
- try
- {
- clTimeout.opSleep_async(cb, 2000);
- }
- catch(Ice.LocalException ex)
- {
- test(false);
- }
- test(cb.check());
- }
return cl;
}
}