summaryrefslogtreecommitdiffstats
path: root/storageapi/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-11-25 16:52:57 +0100
committerGitHub <noreply@github.com>2020-11-25 16:52:57 +0100
commit3ca30562411372bb23d3d871a24111e20f79892b (patch)
treedff3e2d37a539dabc9477247554e7387bbb7b401 /storageapi/src/tests
parent9b6a40a34d92bb723587b55fad9b4954dc5f275d (diff)
parente9e1b5ef1e6cd77ff5e198ac2ff70449499371af (diff)
Merge pull request #15466 from vespa-engine/geirst/simplify-storage-message-address
Simplify storage message address
Diffstat (limited to 'storageapi/src/tests')
-rw-r--r--storageapi/src/tests/mbusprot/storageprotocoltest.cpp2
-rw-r--r--storageapi/src/tests/messageapi/storage_message_address_test.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
index 68eb4a90c9f..e413a62ae39 100644
--- a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
+++ b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
@@ -117,7 +117,7 @@ namespace {
TEST_F(StorageProtocolTest, testAddress50) {
StorageMessageAddress address("foo", lib::NodeType::STORAGE, 3);
EXPECT_EQ(vespalib::string("storage/cluster.foo/storage/3/default"),
- address.getRoute().toString());
+ address.to_mbus_route().toString());
}
template<typename Command> std::shared_ptr<Command>
diff --git a/storageapi/src/tests/messageapi/storage_message_address_test.cpp b/storageapi/src/tests/messageapi/storage_message_address_test.cpp
index 55adcf46c0d..f7f254e9119 100644
--- a/storageapi/src/tests/messageapi/storage_message_address_test.cpp
+++ b/storageapi/src/tests/messageapi/storage_message_address_test.cpp
@@ -22,17 +22,17 @@ TEST(StorageMessageAddressTest, storage_hash_covers_all_expected_fields) {
hash_of("foo", lib::NodeType::DISTRIBUTOR, 0));
EXPECT_EQ(hash_of("foo", lib::NodeType::STORAGE, 123),
hash_of("foo", lib::NodeType::STORAGE, 123));
+ EXPECT_EQ(hash_of("foo", lib::NodeType::STORAGE, 0),
+ hash_of("bar", lib::NodeType::STORAGE, 0));
// These tests are all true with extremely high probability, though they do
// depend on a hash function that may inherently cause collisions.
EXPECT_NE(hash_of("foo", lib::NodeType::STORAGE, 0),
- hash_of("bar", lib::NodeType::STORAGE, 0));
- EXPECT_NE(hash_of("foo", lib::NodeType::STORAGE, 0),
hash_of("foo", lib::NodeType::DISTRIBUTOR, 0));
EXPECT_NE(hash_of("foo", lib::NodeType::STORAGE, 0),
hash_of("foo", lib::NodeType::STORAGE, 1));
- EXPECT_EQ(112u, sizeof(StorageMessageAddress));
+ EXPECT_EQ(88u, sizeof(StorageMessageAddress));
EXPECT_EQ(64u, sizeof(StorageMessage));
EXPECT_EQ(16u, sizeof(mbus::Trace));
}