diff options
Diffstat (limited to 'documentapi/src/tests/policies')
-rw-r--r-- | documentapi/src/tests/policies/CMakeLists.txt | 2 | ||||
-rw-r--r-- | documentapi/src/tests/policies/policies_test.cpp | 12 | ||||
-rw-r--r-- | documentapi/src/tests/policies/testframe.cpp | 2 | ||||
-rw-r--r-- | documentapi/src/tests/policies/testframe.h | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/documentapi/src/tests/policies/CMakeLists.txt b/documentapi/src/tests/policies/CMakeLists.txt index 9a92d60ebdd..2482342a08f 100644 --- a/documentapi/src/tests/policies/CMakeLists.txt +++ b/documentapi/src/tests/policies/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(documentapi_policies_test_app TEST SOURCES testframe.cpp diff --git a/documentapi/src/tests/policies/policies_test.cpp b/documentapi/src/tests/policies/policies_test.cpp index ada3e9154f2..7091b63b6b3 100644 --- a/documentapi/src/tests/policies/policies_test.cpp +++ b/documentapi/src/tests/policies/policies_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "testframe.h" #include <vespa/documentapi/documentapi.h> @@ -806,7 +806,7 @@ Test::requireThatContentPolicyIsRandomWithoutState() ContentPolicy &policy = setupContentPolicy( frame, param, "storage/cluster.mycluster/distributor/*/default", 5); - ASSERT_TRUE(policy.getSystemState() == nullptr); + ASSERT_FALSE(policy.getSystemState()); std::set<string> lst; for (uint32_t i = 0; i < 666; i++) { @@ -858,12 +858,12 @@ Test::requireThatContentPolicyIsTargetedWithState() "cluster=mycluster;slobroks=tcp/localhost:%d;clusterconfigid=%s;syncinit", slobrok.port(), getDefaultDistributionConfig(2, 5).c_str()); ContentPolicy &policy = setupContentPolicy(frame, param, "storage/cluster.mycluster/distributor/*/default", 5); - ASSERT_TRUE(policy.getSystemState() == nullptr); + ASSERT_FALSE(policy.getSystemState()); { std::vector<mbus::RoutingNode*> leaf; ASSERT_TRUE(frame.select(leaf, 1)); leaf[0]->handleReply(std::make_unique<WrongDistributionReply>("distributor:5 storage:5")); - ASSERT_TRUE(policy.getSystemState() != nullptr); + ASSERT_TRUE(policy.getSystemState()); EXPECT_EQUAL(policy.getSystemState()->toString(), "distributor:5 storage:5"); } std::set<string> lst; @@ -897,12 +897,12 @@ Test::requireThatContentPolicyCombinesSystemAndSlobrokState() ContentPolicy &policy = setupContentPolicy( frame, param, "storage/cluster.mycluster/distributor/*/default", 1); - ASSERT_TRUE(policy.getSystemState() == nullptr); + ASSERT_FALSE(policy.getSystemState()); { std::vector<mbus::RoutingNode*> leaf; ASSERT_TRUE(frame.select(leaf, 1)); leaf[0]->handleReply(std::make_unique<WrongDistributionReply>("distributor:99 storage:99")); - ASSERT_TRUE(policy.getSystemState() != nullptr); + ASSERT_TRUE(policy.getSystemState()); EXPECT_EQUAL(policy.getSystemState()->toString(), "distributor:99 storage:99"); } for (int i = 0; i < 666; i++) { diff --git a/documentapi/src/tests/policies/testframe.cpp b/documentapi/src/tests/policies/testframe.cpp index 8cc13b116b6..c03662917dd 100644 --- a/documentapi/src/tests/policies/testframe.cpp +++ b/documentapi/src/tests/policies/testframe.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "testframe.h" #include <vespa/messagebus/emptyreply.h> diff --git a/documentapi/src/tests/policies/testframe.h b/documentapi/src/tests/policies/testframe.h index a609e4b5b5c..d25711e3538 100644 --- a/documentapi/src/tests/policies/testframe.h +++ b/documentapi/src/tests/policies/testframe.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/documentapi/messagebus/documentprotocol.h> |