summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-05-09 09:59:37 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-05-09 09:59:37 +0000
commit754eac4c3527879ebf43fcd38a9970c0e735e00d (patch)
treee6ce1c6aab5402f0e0acf046ed841738bc95627b /cpp/test
parentSimplified Application view; fixed PropertySets issues (diff)
downloadice-754eac4c3527879ebf43fcd38a9970c0e735e00d.tar.bz2
ice-754eac4c3527879ebf43fcd38a9970c0e735e00d.tar.xz
ice-754eac4c3527879ebf43fcd38a9970c0e735e00d.zip
Fixed allocateByType bug, fixed TODO XXX
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/IceGrid/allocation/AllTests.cpp27
-rw-r--r--cpp/test/IceGrid/allocation/application.xml2
2 files changed, 29 insertions, 0 deletions
diff --git a/cpp/test/IceGrid/allocation/AllTests.cpp b/cpp/test/IceGrid/allocation/AllTests.cpp
index abd833962cc..600aa967ec5 100644
--- a/cpp/test/IceGrid/allocation/AllTests.cpp
+++ b/cpp/test/IceGrid/allocation/AllTests.cpp
@@ -494,6 +494,33 @@ allTests(const Ice::CommunicatorPtr& communicator)
session1->setAllocationTimeout(0);
session2->setAllocationTimeout(0);
+
+ try
+ {
+ obj = session1->allocateObjectByType("::Unknown");
+ test(false);
+ }
+ catch(const AllocationTimeoutException&)
+ {
+ test(false);
+ }
+ catch(const AllocationException&)
+ {
+ }
+
+ try
+ {
+ obj = session1->allocateObjectByType("::NotAllocatable");
+ test(false);
+ }
+ catch(const AllocationTimeoutException&)
+ {
+ test(false);
+ }
+ catch(const AllocationException&)
+ {
+ }
+
obj = session1->allocateObjectByType("::Test");
test(obj && obj->ice_getIdentity().name == "allocatable");
try
diff --git a/cpp/test/IceGrid/allocation/application.xml b/cpp/test/IceGrid/allocation/application.xml
index 46b1a045110..0a9b9edd29f 100644
--- a/cpp/test/IceGrid/allocation/application.xml
+++ b/cpp/test/IceGrid/allocation/application.xml
@@ -9,9 +9,11 @@
<object identity="nonallocatable" type="::Test" allocatable="false"/>
<object identity="allocatable" type="::Test" allocatable="true"/>
<object identity="allocatablebis" type="::TestBis" allocatable="true"/>
+ <object identity="nonallocatable2" type="::NotAllocatable"/>
</adapter>
</server>
+
<server id="AdapterAllocation" exe="${test.dir}/server" activation="on-demand" pwd=".">
<adapter name="Server" endpoints="default" allocatable="true" id="AdapterAlloc">
<object identity="allocatable1" type="::TestAdapter1"/>