diff options
author | Jose <jose@zeroc.com> | 2009-07-02 19:39:13 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-07-02 19:39:13 +0200 |
commit | b288490bceaab7f9c20eb9de62fa7a7ff4f6a917 (patch) | |
tree | 8645fb6933ced669886f71f415eb57f676912ebf /java/test/Ice/servantLocator/AllTests.java | |
parent | Fixed test failure introduce by previous fix (diff) | |
download | ice-b288490bceaab7f9c20eb9de62fa7a7ff4f6a917.tar.bz2 ice-b288490bceaab7f9c20eb9de62fa7a7ff4f6a917.tar.xz ice-b288490bceaab7f9c20eb9de62fa7a7ff4f6a917.zip |
Bug 2564 - ObjectAdapter::removeServantLocator
Diffstat (limited to 'java/test/Ice/servantLocator/AllTests.java')
-rw-r--r-- | java/test/Ice/servantLocator/AllTests.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/java/test/Ice/servantLocator/AllTests.java b/java/test/Ice/servantLocator/AllTests.java index 16c0450f5d5..b9ab0ea648f 100644 --- a/java/test/Ice/servantLocator/AllTests.java +++ b/java/test/Ice/servantLocator/AllTests.java @@ -14,6 +14,9 @@ import java.io.PrintWriter; import test.Ice.servantLocator.Test.TestImpossibleException; import test.Ice.servantLocator.Test.TestIntfPrx; import test.Ice.servantLocator.Test.TestIntfPrxHelper; +import test.Ice.servantLocator.Test.TestActivationPrx; +import test.Ice.servantLocator.Test.TestActivationPrxHelper; + import Ice.ObjectNotExistException; import Ice.ObjectPrx; import Ice.UnknownException; @@ -286,6 +289,33 @@ public class AllTests testExceptions(obj, collocated); out.println("ok"); + out.print("testing servant locator removal... "); + out.flush(); + base = communicator.stringToProxy("test/activation:default -p 12010"); + TestActivationPrx activation = TestActivationPrxHelper.checkedCast(base); + activation.activateServantLocator(false); + try + { + obj.ice_ping(); + test(false); + } + catch(ObjectNotExistException ex) + { + out.println("ok"); + } + out.print("testing servant locator addition... "); + out.flush(); + activation.activateServantLocator(true); + try + { + obj.ice_ping(); + out.println("ok"); + } + catch(Exception ex) + { + test(false); + } + return obj; } } |