aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/tests/proton')
-rw-r--r--searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp110
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary_test.cpp16
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdb_test.cpp12
-rw-r--r--searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp12
-rw-r--r--searchcore/src/tests/proton/matching/match_loop_communicator/match_loop_communicator_test.cpp38
-rw-r--r--searchcore/src/tests/proton/persistenceconformance/.gitignore2
-rw-r--r--searchcore/src/tests/proton/persistenceconformance/CMakeLists.txt17
-rw-r--r--searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp6
-rw-r--r--searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp3
9 files changed, 175 insertions, 41 deletions
diff --git a/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp b/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp
index fd202c24887..732a95e7c13 100644
--- a/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp
@@ -2,11 +2,19 @@
#include <vespa/searchcore/proton/attribute/attribute_manager_explorer.h>
#include <vespa/searchcore/proton/attribute/attributemanager.h>
+#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
+#include <vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h>
#include <vespa/searchcore/proton/test/attribute_utils.h>
#include <vespa/searchcore/proton/test/attribute_vectors.h>
+#include <vespa/searchlib/attribute/attributefactory.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h>
#include <vespa/searchlib/attribute/interlock.h>
+#include <vespa/searchlib/attribute/reference_attribute.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/test/directory_handler.h>
+#include <vespa/searchlib/test/mock_gid_to_lid_mapping.h>
#include <vespa/searchcommon/attribute/config.h>
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/gtest/gtest.h>
@@ -21,6 +29,12 @@ using namespace proton;
using namespace proton::test;
using search::AttributeVector;
using search::DictionaryConfig;
+using search::attribute::BasicType;
+using search::attribute::Config;
+using search::attribute::ImportedAttributeVector;
+using search::attribute::ImportedAttributeVectorFactory;
+using search::attribute::ReferenceAttribute;
+using search::attribute::test::MockGidToLidMapperFactory;
using vespalib::ForegroundThreadExecutor;
using vespalib::ISequencedTaskExecutor;
using vespalib::SequencedTaskExecutor;
@@ -32,6 +46,10 @@ using vespalib::HwInfo;
const vespalib::string TEST_DIR = "test_output";
+const vespalib::string ref_name("ref");
+const vespalib::string target_name("f3");
+const vespalib::string imported_name("my_f3");
+
namespace {
VESPA_THREAD_STACK_TAG(test_executor)
}
@@ -43,28 +61,13 @@ struct AttributesStateExplorerTest : public ::testing::Test
std::unique_ptr<ISequencedTaskExecutor> _attribute_field_writer;
ForegroundThreadExecutor _shared;
HwInfo _hwInfo;
+ std::shared_ptr<const IDocumentMetaStoreContext> _parent_dms;
+ std::shared_ptr<IDocumentMetaStoreContext> _dms;
+ std::shared_ptr<AttributeManager> _parent_mgr;
AttributeManager::SP _mgr;
AttributeManagerExplorer _explorer;
- AttributesStateExplorerTest()
- : _dirHandler(TEST_DIR),
- _fileHeaderContext(),
- _attribute_field_writer(SequencedTaskExecutor::create(test_executor, 1)),
- _shared(),
- _hwInfo(),
- _mgr(new AttributeManager(TEST_DIR, "test.subdb", TuneFileAttributes(),
- _fileHeaderContext,
- std::make_shared<search::attribute::Interlock>(),
- *_attribute_field_writer,
- _shared,
- _hwInfo)),
- _explorer(_mgr)
- {
- addAttribute("regular");
- addExtraAttribute("extra");
- add_fast_search_attribute("btree", DictionaryConfig::Type::BTREE);
- add_fast_search_attribute("hybrid", DictionaryConfig::Type::BTREE_AND_HASH);
- add_fast_search_attribute("hash", DictionaryConfig::Type::HASH);
- }
+ AttributesStateExplorerTest() noexcept;
+ ~AttributesStateExplorerTest() override;
void addAttribute(const vespalib::string &name) {
_mgr->addAttribute({name, AttributeUtils::getInt32Config()}, 1);
}
@@ -84,16 +87,71 @@ struct AttributesStateExplorerTest : public ::testing::Test
_explorer.get_child(name)->get_state(inserter, true);
return result;
}
-
+ void add_reference_attribute() {
+ search::attribute::Config cfg(BasicType::REFERENCE);
+ _mgr->addAttribute({ ref_name, cfg }, 1);
+ auto& ref_attr = dynamic_cast<ReferenceAttribute&>(**_mgr->getAttribute(ref_name));
+ ref_attr.setGidToLidMapperFactory(std::make_shared<MockGidToLidMapperFactory>());
+ }
+ std::shared_ptr<ReferenceAttribute> get_reference_attribute() {
+ return std::dynamic_pointer_cast<ReferenceAttribute>(_mgr->getAttribute(ref_name)->getSP());
+ }
+ void add_imported_attributes() {
+ auto repo = std::make_unique<ImportedAttributesRepo>();
+ auto attr = ImportedAttributeVectorFactory::create(imported_name,
+ get_reference_attribute(),
+ _dms,
+ _parent_mgr->getAttribute(target_name)->getSP(),
+ _parent_dms,
+ false);
+ repo->add(imported_name, attr);
+ _mgr->setImportedAttributes(std::move(repo));
+ }
};
+AttributesStateExplorerTest::AttributesStateExplorerTest() noexcept
+ : _dirHandler(TEST_DIR),
+ _fileHeaderContext(),
+ _attribute_field_writer(SequencedTaskExecutor::create(test_executor, 1)),
+ _shared(),
+ _hwInfo(),
+ _parent_dms(std::make_shared<const DocumentMetaStoreContext>(std::make_shared<bucketdb::BucketDBOwner>())),
+ _dms(),
+ _parent_mgr(std::make_shared<AttributeManager>
+ (TEST_DIR, "test.parent.subdb", TuneFileAttributes(),
+ _fileHeaderContext,
+ std::make_shared<search::attribute::Interlock>(),
+ *_attribute_field_writer,
+ _shared,
+ _hwInfo)),
+ _mgr(new AttributeManager(TEST_DIR, "test.subdb", TuneFileAttributes(),
+ _fileHeaderContext,
+ std::make_shared<search::attribute::Interlock>(),
+ *_attribute_field_writer,
+ _shared,
+ _hwInfo)),
+ _explorer(_mgr)
+{
+ _parent_mgr->addAttribute({target_name, AttributeUtils::getInt32Config()}, 1);
+ addAttribute("regular");
+ addExtraAttribute("extra");
+ add_fast_search_attribute("btree", DictionaryConfig::Type::BTREE);
+ add_fast_search_attribute("hybrid", DictionaryConfig::Type::BTREE_AND_HASH);
+ add_fast_search_attribute("hash", DictionaryConfig::Type::HASH);
+ add_reference_attribute();
+ add_imported_attributes();
+}
+
+AttributesStateExplorerTest::~AttributesStateExplorerTest() = default;
+
+
using StringVector = std::vector<vespalib::string>;
TEST_F(AttributesStateExplorerTest, require_that_attributes_are_exposed_as_children_names)
{
StringVector children = _explorer.get_children_names();
std::sort(children.begin(), children.end());
- EXPECT_EQ(StringVector({"btree", "hash", "hybrid", "regular"}), children);
+ EXPECT_EQ(StringVector({"btree", "hash", "hybrid", "my_f3", "ref", "regular"}), children);
}
TEST_F(AttributesStateExplorerTest, require_that_attributes_are_explorable)
@@ -125,4 +183,12 @@ TEST_F(AttributesStateExplorerTest, require_that_dictionary_memory_usage_is_repo
}
}
+TEST_F(AttributesStateExplorerTest, require_that_imported_attribute_shows_memory_usage)
+{
+ vespalib::string cache_memory_usage("cacheMemoryUsage");
+ auto slime = explore_attribute(imported_name);
+ EXPECT_LT(0, slime[cache_memory_usage]["allocated"].asLong());
+ EXPECT_LT(0, slime[cache_memory_usage]["used"].asLong());
+}
+
GTEST_MAIN_RUN_ALL_TESTS()
diff --git a/searchcore/src/tests/proton/docsummary/docsummary_test.cpp b/searchcore/src/tests/proton/docsummary/docsummary_test.cpp
index e8ed780ed82..173cfbbf052 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary_test.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary_test.cpp
@@ -18,6 +18,7 @@
#include <vespa/searchcore/proton/server/summaryadapter.h>
#include <vespa/searchcore/proton/test/bucketfactory.h>
#include <vespa/searchcore/proton/test/mock_shared_threading_service.h>
+#include <vespa/searchcore/proton/test/port_numbers.h>
#include <vespa/searchlib/attribute/interlock.h>
#include <vespa/searchlib/engine/docsumapi.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
@@ -63,6 +64,7 @@
#include <vespa/vespalib/data/slime/json_format.h>
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/encoding/base64.h>
+#include <vespa/vespalib/net/socket_spec.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/geo/zcurve.h>
#include <vespa/vespalib/util/destructor_callbacks.h>
@@ -103,6 +105,16 @@ using vespalib::Slime;
using vespalib::geo::ZCurve;
using namespace vespalib::slime;
+namespace {
+
+constexpr int tls_port = proton::test::port_numbers::docsummary_tls_port;
+
+vespalib::string tls_port_spec() {
+ return vespalib::SocketSpec::from_host_port("localhost", tls_port).spec();
+}
+
+}
+
namespace proton {
class MockDocsumFieldWriterFactory : public search::docsummary::IDocsumFieldWriterFactory
@@ -248,7 +260,7 @@ public:
_fileHeaderContext(),
_summaryExecutor(8),
_shared_service(_summaryExecutor),
- _tls(_shared_service.transport(), "tmp", 9013, ".", _fileHeaderContext),
+ _tls(_shared_service.transport(), "tmp", tls_port, ".", _fileHeaderContext),
_made_dir(std::filesystem::create_directory(std::filesystem::path("tmpdb"))),
_queryLimiter(),
_dummy(),
@@ -271,7 +283,7 @@ public:
_configMgr.forwardConfig(b);
_configMgr.nextGeneration(_shared_service.transport(), 0ms);
std::filesystem::create_directory(std::filesystem::path(std::string("tmpdb/") + docTypeName));
- _ddb = DocumentDB::create("tmpdb", _configMgr.getConfig(), "tcp/localhost:9013", _queryLimiter,
+ _ddb = DocumentDB::create("tmpdb", _configMgr.getConfig(), tls_port_spec(), _queryLimiter,
DocTypeName(docTypeName), makeBucketSpace(), *b->getProtonConfigSP(), *this,
_shared_service, _tls, _dummy, _fileHeaderContext,
std::make_shared<search::attribute::Interlock>(),
diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
index dbe5cd409b3..97c0331ce0b 100644
--- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
@@ -20,6 +20,7 @@
#include <vespa/searchcore/proton/server/fileconfigmanager.h>
#include <vespa/searchcore/proton/server/memoryconfigstore.h>
#include <vespa/searchcore/proton/test/mock_shared_threading_service.h>
+#include <vespa/searchcore/proton/test/port_numbers.h>
#include <vespa/searchcorespi/index/indexflushtarget.h>
#include <vespa/config-bucketspaces.h>
#include <vespa/config/subscription/sourcespec.h>
@@ -33,6 +34,7 @@
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/transactionlog/translogserver.h>
#include <vespa/vespalib/data/slime/slime.h>
+#include <vespa/vespalib/net/socket_spec.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/util/size_literals.h>
@@ -61,6 +63,12 @@ using vespalib::Slime;
namespace {
+constexpr int tls_port = proton::test::port_numbers::documentdb_tls_port;
+
+vespalib::string tls_port_spec() {
+ return vespalib::SocketSpec::from_host_port("localhost", tls_port).spec();
+}
+
void
cleanup_dirs(bool file_config)
{
@@ -133,7 +141,7 @@ Fixture::Fixture(bool file_config)
_hwInfo(),
_db(),
_fileHeaderContext(),
- _tls(_shared_service.transport(), "tmp", 9014, ".", _fileHeaderContext),
+ _tls(_shared_service.transport(), "tmp", tls_port, ".", _fileHeaderContext),
_queryLimiter()
{
auto documenttypesConfig = std::make_shared<DocumenttypesConfig>();
@@ -149,7 +157,7 @@ Fixture::Fixture(bool file_config)
tuneFileDocumentDB, HwInfo());
mgr.forwardConfig(b);
mgr.nextGeneration(_shared_service.transport(), 0ms);
- _db = DocumentDB::create(".", mgr.getConfig(), "tcp/localhost:9014", _queryLimiter, DocTypeName("typea"),
+ _db = DocumentDB::create(".", mgr.getConfig(), tls_port_spec(), _queryLimiter, DocTypeName("typea"),
makeBucketSpace(),
*b->getProtonConfigSP(), _myDBOwner, _shared_service, _tls, _dummy,
_fileHeaderContext,
diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
index 20a6ac40de4..808c5743538 100644
--- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
@@ -26,6 +26,7 @@
#include <vespa/searchcore/proton/feedoperation/updateoperation.h>
#include <vespa/searchcore/proton/persistenceengine/i_resource_write_filter.h>
#include <vespa/searchcore/proton/server/configstore.h>
+#include <vespa/searchcore/proton/test/port_numbers.h>
#include <vespa/document/util/feed_reject_helper.h>
#include <vespa/searchcore/proton/server/ddbstate.h>
#include <vespa/searchcore/proton/server/feedhandler.h>
@@ -36,6 +37,7 @@
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/test/doc_builder.h>
#include <vespa/searchlib/transactionlog/translogserver.h>
+#include <vespa/vespalib/net/socket_spec.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/lambdatask.h>
#include <vespa/vespalib/util/exceptions.h>
@@ -79,6 +81,12 @@ using CountDownLatchUP = std::unique_ptr<vespalib::CountDownLatch>;
namespace {
+constexpr int tls_port = proton::test::port_numbers::feedhandler_tls_port;
+
+vespalib::string tls_port_spec() {
+ return vespalib::SocketSpec::from_host_port("localhost", tls_port).spec();
+}
+
struct Rendezvous {
vespalib::Gate enter;
vespalib::Gate leave;
@@ -428,8 +436,8 @@ struct FeedHandlerFixture
FeedHandlerFixture()
: _fileHeaderContext(),
_service(1),
- tls(_service.transport(), "mytls", 9016, "mytlsdir", _fileHeaderContext, DomainConfig().setPartSizeLimit(0x10000)),
- tlsSpec("tcp/localhost:9016"),
+ tls(_service.transport(), "mytls", tls_port, "mytlsdir", _fileHeaderContext, DomainConfig().setPartSizeLimit(0x10000)),
+ tlsSpec(tls_port_spec()),
schema(),
owner(),
_state(),
diff --git a/searchcore/src/tests/proton/matching/match_loop_communicator/match_loop_communicator_test.cpp b/searchcore/src/tests/proton/matching/match_loop_communicator/match_loop_communicator_test.cpp
index d5ee88e1617..5994385b4aa 100644
--- a/searchcore/src/tests/proton/matching/match_loop_communicator/match_loop_communicator_test.cpp
+++ b/searchcore/src/tests/proton/matching/match_loop_communicator/match_loop_communicator_test.cpp
@@ -1,6 +1,8 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/vespalib/test/insertion_operators.h>
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchcore/proton/matching/match_loop_communicator.h>
+#include <vespa/searchlib/features/first_phase_rank_lookup.h>
#include <algorithm>
using namespace proton::matching;
@@ -12,6 +14,7 @@ using Hit = MatchLoopCommunicator::Hit;
using Hits = MatchLoopCommunicator::Hits;
using TaggedHit = MatchLoopCommunicator::TaggedHit;
using TaggedHits = MatchLoopCommunicator::TaggedHits;
+using search::features::FirstPhaseRankLookup;
using search::queryeval::SortedHitSequence;
std::vector<Hit> hit_vec(std::vector<Hit> list) { return list; }
@@ -96,7 +99,7 @@ TEST_F("require that selectBest gives appropriate results for single thread", Ma
}
TEST_F("require that selectBest gives appropriate results for single thread with filter",
- MatchLoopCommunicator(num_threads, 3, std::make_unique<EveryOdd>()))
+ MatchLoopCommunicator(num_threads, 3, std::make_unique<EveryOdd>(), nullptr))
{
TEST_DO(equal(1u, hit_vec({{1, 5}}), selectBest(f1, hit_vec({{1, 5}, {2, 4}}), thread_id)));
TEST_DO(equal(2u, hit_vec({{1, 5}, {3, 3}}), selectBest(f1, hit_vec({{1, 5}, {2, 4}, {3, 3}}), thread_id)));
@@ -154,8 +157,8 @@ TEST_MT_F("require that rangeCover works with no hits", 10, MatchLoopCommunicato
TEST_FFF("require that hits dropped due to lack of diversity affects range cover result",
MatchLoopCommunicator(num_threads, 3),
- MatchLoopCommunicator(num_threads, 3, std::make_unique<EveryOdd>()),
- MatchLoopCommunicator(num_threads, 3, std::make_unique<None>()))
+ MatchLoopCommunicator(num_threads, 3, std::make_unique<EveryOdd>(), nullptr),
+ MatchLoopCommunicator(num_threads, 3, std::make_unique<None>(), nullptr))
{
auto hits_in = hit_vec({{1, 5}, {2, 4}, {3, 3}, {4, 2}, {5, 1}});
auto [my_work1, hits1, ranges1] = second_phase(f1, hits_in, thread_id, 10);
@@ -207,4 +210,33 @@ TEST_MT_F("require that second phase work is evenly distributed among search thr
}
}
+namespace {
+
+std::vector<double> extract_ranks(const FirstPhaseRankLookup& l) {
+ std::vector<double> result;
+ for (uint32_t docid = 21; docid < 26; ++docid) {
+ result.emplace_back(l.lookup(docid));
+ }
+ return result;
+}
+
+search::feature_t unranked = std::numeric_limits<search::feature_t>::max();
+
+using FeatureVec = std::vector<search::feature_t>;
+
+}
+
+TEST("require that first phase rank lookup is populated")
+{
+ FirstPhaseRankLookup l1;
+ FirstPhaseRankLookup l2;
+ MatchLoopCommunicator f1(num_threads, 3, {}, &l1);
+ MatchLoopCommunicator f2(num_threads, 3, std::make_unique<EveryOdd>(), &l2);
+ auto hits_in = hit_vec({{21, 5}, {22, 4}, {23, 3}, {24, 2}, {25, 1}});
+ auto res1 = second_phase(f1, hits_in, thread_id, 10);
+ auto res2 = second_phase(f2, hits_in, thread_id, 10);
+ EXPECT_EQUAL(FeatureVec({1, 2, 3, unranked, unranked}), extract_ranks(l1));
+ EXPECT_EQUAL(FeatureVec({1, unranked, 3, unranked, 5}), extract_ranks(l2));
+}
+
TEST_MAIN() { TEST_RUN_ALL(); }
diff --git a/searchcore/src/tests/proton/persistenceconformance/.gitignore b/searchcore/src/tests/proton/persistenceconformance/.gitignore
index 9b6330d1531..d1a3a8b1a37 100644
--- a/searchcore/src/tests/proton/persistenceconformance/.gitignore
+++ b/searchcore/src/tests/proton/persistenceconformance/.gitignore
@@ -1 +1 @@
-/vlog.txt
+/vlog*.txt
diff --git a/searchcore/src/tests/proton/persistenceconformance/CMakeLists.txt b/searchcore/src/tests/proton/persistenceconformance/CMakeLists.txt
index ac94a4e9f8a..b7080ff3593 100644
--- a/searchcore/src/tests/proton/persistenceconformance/CMakeLists.txt
+++ b/searchcore/src/tests/proton/persistenceconformance/CMakeLists.txt
@@ -1,7 +1,12 @@
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-vespa_add_test(
- NAME searchcore_persistenceconformance_test_app
- COMMAND searchcore_persistenceconformance_test_app
- ENVIRONMENT "VESPA_LOG_TARGET=file:vlog.txt"
- COST 200
-)
+set(TOTAL_SHARDS 5)
+math(EXPR MAX_SHARD_INDEX "${TOTAL_SHARDS} - 1")
+foreach(SHARD_INDEX RANGE ${MAX_SHARD_INDEX})
+ string(REGEX MATCH "...$" FMT_SHARD_INDEX "00" ${SHARD_INDEX})
+ vespa_add_test(
+ NAME searchcore_persistenceconformance_test_app_shard_${FMT_SHARD_INDEX}
+ COMMAND searchcore_persistenceconformance_test_app
+ ENVIRONMENT "VESPA_LOG_TARGET=file:vlog_shard_${FMT_SHARD_INDEX}.txt;GTEST_SHARD_INDEX=${SHARD_INDEX};GTEST_TOTAL_SHARDS=${TOTAL_SHARDS}"
+ COST 100
+ )
+endforeach()
diff --git a/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp b/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
index 09cec0d6d01..06264e3e642 100644
--- a/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
+++ b/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
@@ -48,6 +48,8 @@ using search::GrowStrategy;
using vespalib::datastore::CompactionStrategy;
using vespalib::HwInfo;
+constexpr int proton_rpc_port = 9010; // Not used for listening in this test
+
struct DoctypeFixture {
using UP = std::unique_ptr<DoctypeFixture>;
AttributesConfigBuilder attributesBuilder;
@@ -242,7 +244,7 @@ TEST_FFF("require that bootstrap config manager updates config", ConfigTestFixtu
ConfigRetriever(f2.createConfigKeySet(), f1.context)) {
f2.update(f3.getBootstrapConfigs());
ASSERT_TRUE(f1.configEqual(*f2.getConfig()));
- f1.protonBuilder.rpcport = 9010;
+ f1.protonBuilder.rpcport = proton_rpc_port;
ASSERT_FALSE(f1.configEqual(*f2.getConfig()));
f1.reload();
f2.update(f3.getBootstrapConfigs());
@@ -316,7 +318,7 @@ TEST_FFF("require that proton config fetcher follows changes to bootstrap",
ASSERT_TRUE(f2._configured);
ASSERT_TRUE(f1.configEqual(*f2.getBootstrapConfig()));
f2._configured = false;
- f1.protonBuilder.rpcport = 9010;
+ f1.protonBuilder.rpcport = proton_rpc_port;
f1.reload();
ASSERT_TRUE(f2.waitUntilConfigured(120s));
ASSERT_TRUE(f1.configEqual(*f2.getBootstrapConfig()));
diff --git a/searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp b/searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp
index 49dbf43da67..411dd88f995 100644
--- a/searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp
+++ b/searchcore/src/tests/proton/proton_disk_layout/proton_disk_layout_test.cpp
@@ -2,6 +2,7 @@
#include <vespa/searchcore/proton/server/proton_disk_layout.h>
#include <vespa/searchcore/proton/common/doctypename.h>
+#include <vespa/searchcore/proton/test/port_numbers.h>
#include <vespa/searchcore/proton/test/transport_helper.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/transactionlog/translogserver.h>
@@ -19,7 +20,7 @@ using proton::DocTypeName;
using proton::ProtonDiskLayout;
using proton::Transport;
-static constexpr unsigned int tlsPort = 9018;
+static constexpr unsigned int tlsPort = proton::test::port_numbers::proton_disk_layout_tls_port;
static const vespalib::string baseDir("testdb");
static const vespalib::string documentsDir(baseDir + "/documents");