summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rwxr-xr-x[-rw-r--r--]cpp/src/Freeze/EvictorIteratorI.cpp6
-rwxr-xr-x[-rw-r--r--]cpp/test/Freeze/evictor/TestI.cpp8
2 files changed, 11 insertions, 3 deletions
diff --git a/cpp/src/Freeze/EvictorIteratorI.cpp b/cpp/src/Freeze/EvictorIteratorI.cpp
index 978747ef7f0..f28cf805f28 100644..100755
--- a/cpp/src/Freeze/EvictorIteratorI.cpp
+++ b/cpp/src/Freeze/EvictorIteratorI.cpp
@@ -60,15 +60,15 @@ Freeze::EvictorIteratorI::next()
vector<Identity>::const_iterator
Freeze::EvictorIteratorI::nextBatch()
{
- DeactivateController::Guard
- deactivateGuard(_store->evictor()->deactivateController());
-
_batch.clear();
if(!_more)
{
return _batch.end();
}
+
+ DeactivateController::Guard
+ deactivateGuard(_store->evictor()->deactivateController());
Key firstKey = _key;
diff --git a/cpp/test/Freeze/evictor/TestI.cpp b/cpp/test/Freeze/evictor/TestI.cpp
index 2be433a4309..56a5a80a910 100644..100755
--- a/cpp/test/Freeze/evictor/TestI.cpp
+++ b/cpp/test/Freeze/evictor/TestI.cpp
@@ -534,6 +534,14 @@ Test::RemoteEvictorI::RemoteEvictorI(const CommunicatorPtr& communicator, const
{
_evictor = Freeze::createBackgroundSaveEvictor(_evictorAdapter, envName, category, initializer);
}
+
+ //
+ // Check that we can get an iterator on a non-existing facet
+ //
+ Freeze::EvictorIteratorPtr p = _evictor->getIterator("foo", 1);
+ test(p->hasNext() == false);
+
+
initializer->init(this, _evictor);
_evictorAdapter->addServantLocator(_evictor, category);