summaryrefslogtreecommitdiff
path: root/cpp/test/IceGrid/activation/AllTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/IceGrid/activation/AllTests.cpp')
-rw-r--r--cpp/test/IceGrid/activation/AllTests.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/test/IceGrid/activation/AllTests.cpp b/cpp/test/IceGrid/activation/AllTests.cpp
index ae413a33d6e..5e09788f2a3 100644
--- a/cpp/test/IceGrid/activation/AllTests.cpp
+++ b/cpp/test/IceGrid/activation/AllTests.cpp
@@ -364,6 +364,27 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
}
test(admin->getServerState("server-always") == IceGrid::Inactive);
+
+
+ test(admin->getServerState("server") == IceGrid::Inactive);
+ admin->enableServer("server", true);
+ communicator->stringToProxy("server")->ice_locatorCacheTimeout(0)->ice_ping();
+ int pid = admin->getServerPid("server");
+ admin->enableServer("server", false);
+ test(admin->getServerState("server") == IceGrid::Active);
+ try
+ {
+ communicator->stringToProxy("server")->ice_locatorCacheTimeout(0)->ice_ping();
+ test(false);
+ }
+ catch(const Ice::NoEndpointException&)
+ {
+ }
+ admin->enableServer("server", true);
+ communicator->stringToProxy("server")->ice_locatorCacheTimeout(0)->ice_ping();
+ test(admin->getServerPid("server") == pid);
+ admin->stopServer("server");
+ test(admin->getServerState("server") == IceGrid::Inactive);
}
catch(const Ice::LocalException& ex)
{