summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-05-23 12:23:55 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-05-23 12:23:55 +0000
commit029fd83551338ea01613c54ddbc4906c09227c60 (patch)
treedf5e77cbb88f29def748393baf98d88d172cb7ba /cpp/test
parentfix test for recent slice change (diff)
downloadice-029fd83551338ea01613c54ddbc4906c09227c60.tar.bz2
ice-029fd83551338ea01613c54ddbc4906c09227c60.tar.xz
ice-029fd83551338ea01613c54ddbc4906c09227c60.zip
Added support for Glacier2 filters.
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/IceGrid/allocation/AllTests.cpp38
-rw-r--r--cpp/test/IceGrid/allocation/application.xml11
-rwxr-xr-xcpp/test/IceGrid/allocation/run.py2
3 files changed, 49 insertions, 2 deletions
diff --git a/cpp/test/IceGrid/allocation/AllTests.cpp b/cpp/test/IceGrid/allocation/AllTests.cpp
index 34a234689af..64ec1a87426 100644
--- a/cpp/test/IceGrid/allocation/AllTests.cpp
+++ b/cpp/test/IceGrid/allocation/AllTests.cpp
@@ -13,6 +13,7 @@
#include <IceGrid/Registry.h>
#include <IceGrid/Admin.h>
#include <IceGrid/Query.h>
+#include <Glacier2/Router.h>
#include <TestCommon.h>
#include <Test.h>
@@ -325,6 +326,18 @@ allTests(const Ice::CommunicatorPtr& communicator)
AdminPrx admin = AdminPrx::checkedCast(communicator->stringToProxy("IceGrid/Admin"));
test(admin);
+ cout << "starting router... " << flush;
+ try
+ {
+ admin->startServer("Glacier2");
+ }
+ catch(const ServerStartException& ex)
+ {
+ cerr << ex.reason << endl;
+ test(false);
+ }
+ cout << "ok" << endl;
+
RegistryPrx registry = RegistryPrx::checkedCast(communicator->stringToProxy("IceGrid/Registry"));
test(registry);
@@ -925,6 +938,27 @@ allTests(const Ice::CommunicatorPtr& communicator)
cout << "ok" << endl;
+// cout << "testing allocation with Glacier2 router... " << flush;
+// Ice::ObjectPrx routerBase = communicator->stringToProxy("Glacier2/router:default -p 12347");
+// Glacier2::RouterPrx router1 = Glacier2::RouterPrx::checkedCast(routerBase->ice_connectionId("client1"));
+// test(router1);
+
+// Glacier2::SessionPrx sessionBase = router1->createSession("test1", "abc123");
+// try
+// {
+// session1 = IceGrid::SessionPrx::checkedCast(sessionBase->ice_connectionId("client1")->ice_router(router1));
+// test(session1);
+// session1->ice_ping();
+
+// session1->destroy();
+// }
+// catch(const Ice::LocalException& ex)
+// {
+// cerr << ex << endl;
+// test(false);
+// }
+// cout << "ok" << endl;
+
cout << "stress test... " << flush;
const int nClients = 4;
int i;
@@ -970,4 +1004,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
cerr << ex.reason << endl;
test(false);
}
+
+ cout << "shutting down router... " << flush;
+ admin->stopServer("Glacier2");
+ cout << "ok" << endl;
}
diff --git a/cpp/test/IceGrid/allocation/application.xml b/cpp/test/IceGrid/allocation/application.xml
index 3679da32f20..26cbf3f13a6 100644
--- a/cpp/test/IceGrid/allocation/application.xml
+++ b/cpp/test/IceGrid/allocation/application.xml
@@ -1,6 +1,6 @@
<icegrid>
- <application name="test" import-default-templates="true">
+ <application name="Test" import-default-templates="true">
<replica-group id="Test">
<object identity="nonallocatable" type="::Test"/>
@@ -9,6 +9,15 @@
<node name="localnode">
+ <server id="Glacier2" exe="${ice.dir}/bin/glacier2router">
+ <adapter name="Glacier2.Client" id="" endpoints="default -p 12347 -h 127.0.0.1 -t 10000"/>
+ <adapter name="Glacier2.Server" id="" endpoints="tcp -h 127.0.01"/>
+ <adapter name="Glacier2.Admin" id="" endpoints="tcp -h 127.0.0.1" register-process="true"/>
+ <property name="Glacier2.SessionManager" value="IceGrid/SessionManager"/>
+ <property name="Glacier2.PermissionsVerifier" value="IceGrid/NullPermissionsVerifier"/>
+ <property name="Glacier2.Client.Trace.Reject" value="2"/>
+ </server>
+
<server id="ObjectAllocation" exe="${test.dir}/server" activation="on-demand" pwd=".">
<adapter name="Server" endpoints="default">
<object identity="allocatable" type="::Test"/>
diff --git a/cpp/test/IceGrid/allocation/run.py b/cpp/test/IceGrid/allocation/run.py
index 62306eb7763..34900817a5c 100755
--- a/cpp/test/IceGrid/allocation/run.py
+++ b/cpp/test/IceGrid/allocation/run.py
@@ -55,7 +55,7 @@ except:
clientStatus = TestUtil.closePipe(clientPipe)
print "removing application...",
-IceGridAdmin.removeApplication("test")
+IceGridAdmin.removeApplication("Test")
print "ok"
IceGridAdmin.shutdownIceGridNode()