summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2007-05-01 06:20:04 +0000
committerMatthew Newhook <matthew@zeroc.com>2007-05-01 06:20:04 +0000
commitabdbf8c3efbc4139062ce3cc220ea07dd5fbdf0f (patch)
treebc8023e87a4afef1d6f95091f250fb5f49ec4ed0 /cpp
parentremove timeout test from proxy test. (diff)
downloadice-abdbf8c3efbc4139062ce3cc220ea07dd5fbdf0f.tar.bz2
ice-abdbf8c3efbc4139062ce3cc220ea07dd5fbdf0f.tar.xz
ice-abdbf8c3efbc4139062ce3cc220ea07dd5fbdf0f.zip
remove timeout test from proxy test. Cleanup of operations test.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/Ice/operations/ServerAMD.cpp4
-rw-r--r--cpp/test/Ice/proxy/AllTests.cpp70
-rw-r--r--cpp/test/Ice/proxy/Client.cpp8
3 files changed, 2 insertions, 80 deletions
diff --git a/cpp/test/Ice/operations/ServerAMD.cpp b/cpp/test/Ice/operations/ServerAMD.cpp
index adfbac159bc..9f28e51268a 100644
--- a/cpp/test/Ice/operations/ServerAMD.cpp
+++ b/cpp/test/Ice/operations/ServerAMD.cpp
@@ -17,9 +17,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::Identity id = communicator->stringToIdentity("test");
- adapter->add(new MyDerivedClassI(adapter, id), id);
- adapter->add(new TestCheckedCastI, communicator->stringToIdentity("context"));
+ adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp
index cffc5b176f8..484258ae6b2 100644
--- a/cpp/test/Ice/proxy/AllTests.cpp
+++ b/cpp/test/Ice/proxy/AllTests.cpp
@@ -15,49 +15,6 @@
using namespace std;
-class AMI_MyClass_opSleepI : public Test::AMI_MyClass_opSleep, public IceUtil::Monitor<IceUtil::Mutex>
-{
-public:
-
- AMI_MyClass_opSleepI() :
- _called(false)
- {
- }
-
- virtual void ice_response()
- {
- test(false);
- }
-
- virtual void ice_exception(const ::Ice::Exception& ex)
- {
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
- assert(!_called);
- _called = true;
- notify();
- test(dynamic_cast<const ::Ice::TimeoutException*>(&ex));
- }
-
- bool check()
- {
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
- while(!_called)
- {
- if(!timedWait(IceUtil::Time::seconds(5)))
- {
- return false;
- }
- }
- _called = false;
- return true;
- }
-
-private:
-
- bool _called;
-};
-typedef IceUtil::Handle<AMI_MyClass_opSleepI> AMI_MyClass_opSleepIPtr;
-
Test::MyClassPrx
allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
{
@@ -530,32 +487,5 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
cout << "ok" << endl;
- if(!collocated)
- {
- cout << "testing timeout... " << flush;
- Test::MyClassPrx clTimeout = Test::MyClassPrx::uncheckedCast(base->ice_timeout(500));
- try
- {
- clTimeout->opSleep(2000);
- test(false);
- }
- catch(const Ice::TimeoutException&)
- {
- }
-
- AMI_MyClass_opSleepIPtr cb = new AMI_MyClass_opSleepI();
- try
- {
- clTimeout->opSleep_async(cb, 2000);
- }
- catch(const Ice::Exception&)
- {
- test(false);
- }
- test(cb->check());
-
- cout << "ok" << endl;
- }
-
return cl;
}
diff --git a/cpp/test/Ice/proxy/Client.cpp b/cpp/test/Ice/proxy/Client.cpp
index c9527dea93a..854d01df137 100644
--- a/cpp/test/Ice/proxy/Client.cpp
+++ b/cpp/test/Ice/proxy/Client.cpp
@@ -44,16 +44,10 @@ main(int argc, char* argv[])
initData.properties->setProperty("Ice.ThreadPool.Client.SizeWarn", "0");
//
- // We must set MessageSizeMax to an explicit values, because
- // we run tests to check whether Ice.MemoryLimitException is
- // raised as expected.
- //
- initData.properties->setProperty("Ice.MessageSizeMax", "100");
-
- //
// We don't want connection warnings because of the timeout test.
//
initData.properties->setProperty("Ice.Warn.Connections", "0");
+
//
// Use a faster connection monitor timeout to test AMI
// timeouts.