diff options
author | Michi Henning <michi@zeroc.com> | 2002-09-04 05:39:57 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2002-09-04 05:39:57 +0000 |
commit | a5da64185ba234ae8dfdec11764e1821bbc67a57 (patch) | |
tree | 4aa60640dbb0b01960e8aa644ef9179594e28b6d /java/test | |
parent | fix (diff) | |
download | ice-a5da64185ba234ae8dfdec11764e1821bbc67a57.tar.bz2 ice-a5da64185ba234ae8dfdec11764e1821bbc67a57.tar.xz ice-a5da64185ba234ae8dfdec11764e1821bbc67a57.zip |
Changed Current.ice to use enum OperationMode to distinguish between
Normal, Nonmutating, and Idempotent operations. Fixed bug introduced
into Freeze with previous changes for saving object state. (State
wasn't saved for idempotent operations.) Retested everything. I'm
getting a failure in the Yellow (C++) tests, and another failure in the
IceBox (Java) tests, but I don't think these are related to these
changes.
Diffstat (limited to 'java/test')
-rw-r--r-- | java/test/Ice/faultTolerance/AllTests.java | 17 | ||||
-rw-r--r-- | java/test/Ice/faultTolerance/Test.ice | 3 | ||||
-rw-r--r-- | java/test/Ice/faultTolerance/TestI.java | 6 | ||||
-rwxr-xr-x | java/test/Ice/faultTolerance/run.py | 2 |
4 files changed, 25 insertions, 3 deletions
diff --git a/java/test/Ice/faultTolerance/AllTests.java b/java/test/Ice/faultTolerance/AllTests.java index 40d9a259745..abd2bd448f4 100644 --- a/java/test/Ice/faultTolerance/AllTests.java +++ b/java/test/Ice/faultTolerance/AllTests.java @@ -41,7 +41,7 @@ public class AllTests System.out.println("ok"); int oldPid = 0; - for(int i = 1, j = 0; i <= ports.length; ++i, j = j >= 2 ? 0 : j + 1) + for(int i = 1, j = 0; i <= ports.length; ++i, j = j >= 3 ? 0 : j + 1) { System.out.print("testing server #" + i + "... "); System.out.flush(); @@ -85,6 +85,21 @@ public class AllTests } ++i; } + else if(j == 3) + { + System.out.print("aborting server #" + i + " and #" + (i + 1) + " with nonmutating call... "); + System.out.flush(); + try + { + obj.nonmutatingAbort(); + test(false); + } + catch(Ice.SocketException ex) + { + System.out.println("ok"); + } + ++i; + } else { assert(false); diff --git a/java/test/Ice/faultTolerance/Test.ice b/java/test/Ice/faultTolerance/Test.ice index 0b62f9b1dc4..56364a3e355 100644 --- a/java/test/Ice/faultTolerance/Test.ice +++ b/java/test/Ice/faultTolerance/Test.ice @@ -16,7 +16,8 @@ interface Test void shutdown(); void abort(); idempotent void idempotentAbort(); - int pid(); + nonmutating void nonmutatingAbort(); + idempotent int pid(); }; #endif diff --git a/java/test/Ice/faultTolerance/TestI.java b/java/test/Ice/faultTolerance/TestI.java index 8a80a5bf316..ed3c9d64416 100644 --- a/java/test/Ice/faultTolerance/TestI.java +++ b/java/test/Ice/faultTolerance/TestI.java @@ -30,6 +30,12 @@ public final class TestI extends _TestDisp System.exit(1); } + public void + nonmutatingAbort(Ice.Current current) + { + System.exit(1); + } + public int pid(Ice.Current current) { diff --git a/java/test/Ice/faultTolerance/run.py b/java/test/Ice/faultTolerance/run.py index 9734ad65d2c..e895d6957bc 100755 --- a/java/test/Ice/faultTolerance/run.py +++ b/java/test/Ice/faultTolerance/run.py @@ -27,7 +27,7 @@ classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, server = "java -classpath \"" + classpath + "\" Server" client = "java -classpath \"" + classpath + "\" Client" -num = 8 +num = 10 base = 12340 updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel) |