diff options
author | Bernard Normier <bernard@zeroc.com> | 2004-04-27 03:36:54 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2004-04-27 03:36:54 +0000 |
commit | 33909e8680c4bfbcde833d1bce8789be0d2ba952 (patch) | |
tree | 853ce3fdcfef05a02feb4b4fdcb0937b06bb8611 /cpp | |
parent | Bug fix (diff) | |
download | ice-33909e8680c4bfbcde833d1bce8789be0d2ba952.tar.bz2 ice-33909e8680c4bfbcde833d1bce8789be0d2ba952.tar.xz ice-33909e8680c4bfbcde833d1bce8789be0d2ba952.zip |
Bug fix
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/test/Freeze/evictor/Client.cpp | 41 | ||||
-rw-r--r-- | cpp/test/Freeze/evictor/Test.ice | 2 | ||||
-rw-r--r-- | cpp/test/Freeze/evictor/TestI.cpp | 6 | ||||
-rw-r--r-- | cpp/test/Freeze/evictor/TestI.h | 2 |
4 files changed, 25 insertions, 26 deletions
diff --git a/cpp/test/Freeze/evictor/Client.cpp b/cpp/test/Freeze/evictor/Client.cpp index 8ee0ff0dd40..9c04e9556a5 100644 --- a/cpp/test/Freeze/evictor/Client.cpp +++ b/cpp/test/Freeze/evictor/Client.cpp @@ -90,7 +90,7 @@ public: test(_servants[i]->slowGetValue() == i); } } - catch(const Ice::ConnectionRefusedException&) + catch(const Ice::SocketException&) { // // Expected @@ -470,13 +470,11 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) } // - // Create and destroy 100 servants to make sure we save and evict + // Evict all // - for(i = 0; i < 100; i++) - { - Test::ServantPrx servant = evictor->createServant(size + i, size + i); - servant->destroy(); - } + evictor->saveNow(); + evictor->setSize(0); + evictor->setSize(size); // // Check the transient value @@ -495,15 +493,10 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) servants[i]->keepInCache(); servants[i]->setTransientValue(i); } - - // - // Create and destroy 100 servants to make sure we save and evict - // - for(i = 0; i < 100; i++) - { - Test::ServantPrx servant = evictor->createServant(size + i, size + i); - servant->destroy(); - } + evictor->saveNow(); + evictor->setSize(0); + evictor->setSize(size); + // // Check the transient value @@ -520,11 +513,9 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { servants[i]->release(); } - for(i = 0; i < 100; i++) - { - Test::ServantPrx servant = evictor->createServant(size + i, size + i); - servant->destroy(); - } + evictor->saveNow(); + evictor->setSize(0); + evictor->setSize(size); for(i = 0; i < size; i++) { test(servants[i]->getTransientValue() == i); @@ -537,11 +528,9 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { servants[i]->release(); } - for(i = 0; i < 100; i++) - { - Test::ServantPrx servant = evictor->createServant(size + i, size + i); - servant->destroy(); - } + evictor->saveNow(); + evictor->setSize(0); + evictor->setSize(size); for(i = 0; i < size; i++) { test(servants[i]->getTransientValue() == -1); diff --git a/cpp/test/Freeze/evictor/Test.ice b/cpp/test/Freeze/evictor/Test.ice index 296fd4cb8bc..cdbe982f481 100644 --- a/cpp/test/Freeze/evictor/Test.ice +++ b/cpp/test/Freeze/evictor/Test.ice @@ -70,6 +70,8 @@ interface RemoteEvictor Servant* getServant(int id); + void saveNow(); + void deactivate(); void destroyAllServants(string facet); }; diff --git a/cpp/test/Freeze/evictor/TestI.cpp b/cpp/test/Freeze/evictor/TestI.cpp index ba92291aa0f..7e0c8b506c0 100644 --- a/cpp/test/Freeze/evictor/TestI.cpp +++ b/cpp/test/Freeze/evictor/TestI.cpp @@ -308,6 +308,12 @@ Test::RemoteEvictorI::getServant(Int id, const Current&) void +Test::RemoteEvictorI::saveNow(const Current& current) +{ + _evictor->getIterator("", 1); +} + +void Test::RemoteEvictorI::deactivate(const Current& current) { _evictorAdapter->deactivate(); diff --git a/cpp/test/Freeze/evictor/TestI.h b/cpp/test/Freeze/evictor/TestI.h index 8c291ed9f96..4ca6333248a 100644 --- a/cpp/test/Freeze/evictor/TestI.h +++ b/cpp/test/Freeze/evictor/TestI.h @@ -103,6 +103,8 @@ public: virtual ::Test::ServantPrx getServant(::Ice::Int, const Ice::Current&); + virtual void saveNow(const Ice::Current&); + virtual void deactivate(const Ice::Current&); virtual void destroyAllServants(const std::string&, const Ice::Current&); |