diff options
author | Tor Egge <Tor.Egge@oath.com> | 2018-02-12 11:33:30 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2018-02-12 13:41:17 +0000 |
commit | 8fea5e1a211442d80958d6b28a176054e6cce7d4 (patch) | |
tree | d1134084f0ac7b1d6c720c4c2f6d69a145e3af24 | |
parent | dc7c91156f25032114226ff9b915930b10716b65 (diff) |
Adjust unit tests to expect global content bucket space.
-rw-r--r-- | storage/src/tests/bucketdb/initializertest.cpp | 13 | ||||
-rw-r--r-- | storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp | 9 |
2 files changed, 18 insertions, 4 deletions
diff --git a/storage/src/tests/bucketdb/initializertest.cpp b/storage/src/tests/bucketdb/initializertest.cpp index cb76876c24e..2141dbf4b53 100644 --- a/storage/src/tests/bucketdb/initializertest.cpp +++ b/storage/src/tests/bucketdb/initializertest.cpp @@ -17,10 +17,13 @@ #include <vespa/vdstestlib/cppunit/macros.h> #include <vespa/storage/bucketdb/lockablemap.hpp> #include <vespa/vdstestlib/cppunit/dirconfig.hpp> +#include <vespa/document/bucket/fixed_bucket_spaces.h> #include <vespa/log/log.h> LOG_SETUP(".test.bucketdb.initializing"); +using document::FixedBucketSpaces; + namespace storage { typedef uint16_t PartitionId; @@ -444,10 +447,12 @@ struct FakePersistenceLayer : public StorageLink { << " for which we should not get a request"; fatal(ost.str()); } else { - for (DiskData::const_iterator it2 = it->second.begin(); - it2 != it->second.end(); ++it2) - { - reply->getBuckets().push_back(it2->first); + if (cmd.getBucket().getBucketSpace() == FixedBucketSpaces::default_space()) { + for (DiskData::const_iterator it2 = it->second.begin(); + it2 != it->second.end(); ++it2) + { + reply->getBuckets().push_back(it2->first); + } } } if (!fatalError.empty()) { diff --git a/storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp b/storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp index ac1a046bd17..7895d9e4cd0 100644 --- a/storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp +++ b/storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp @@ -140,6 +140,8 @@ ModifiedBucketCheckerTest::testDoNotCheckModifiedBucketsIfAlreadyPending() expectCommandsAndSendReplies(0, 0); // After replies received, tick should send new requests again. replyToAll(messages, 0); + _handler->tick(); // global bucket space ==> nothing to do + expectCommandsAndSendReplies(0, 0); _handler->tick(); expectCommandsAndSendReplies(3, 3); } @@ -177,13 +179,20 @@ ModifiedBucketCheckerTest::testRecheckRequestsAreChunked() _handler->tick(); expectCommandsAndSendReplies(1, 4); + _handler->tick(); // global bucket space ==> nothing to do + expectCommandsAndSendReplies(0, 0); + // New round of fetching _handler->tick(); expectCommandsAndSendReplies(1, 10); + _handler->tick(); // global bucket space ==> nothing to do + expectCommandsAndSendReplies(0, 0); // And done! _handler->tick(); expectCommandsAndSendReplies(0, 0); + _handler->tick(); // global bucket space ==> nothing to do + expectCommandsAndSendReplies(0, 0); } void |