aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-11-21 18:07:32 +0100
committerGitHub <noreply@github.com>2021-11-21 18:07:32 +0100
commit4ef7a7d4946cc944c7a95c0524717a000e1e983e (patch)
tree7c9828ea22366dbb2466c8bfaccaa30559d4a40a /searchcore/src/tests
parent9fd403f1873308a0cd02eda221127200ccb3c6bf (diff)
parent856dd76913c27ecb024b553ecba3bf0597044c3c (diff)
Merge pull request #20134 from vespa-engine/balder/less-sync_all_executors
Less sync_all_executors
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp8
-rw-r--r--searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp8
3 files changed, 8 insertions, 14 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index b2acc8703f3..646b244f191 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -377,18 +377,12 @@ struct FeedViewComparer
void expect_equal_index_adapter() {
EXPECT_EQUAL(_old->getIndexWriter().get(), _new->getIndexWriter().get());
}
- void expect_equal_attribute_writer() {
- EXPECT_EQUAL(_old->getAttributeWriter().get(), _new->getAttributeWriter().get());
- }
void expect_not_equal_attribute_writer() {
EXPECT_NOT_EQUAL(_old->getAttributeWriter().get(), _new->getAttributeWriter().get());
}
void expect_equal_summary_adapter() {
EXPECT_EQUAL(_old->getSummaryAdapter().get(), _new->getSummaryAdapter().get());
}
- void expect_equal_schema() {
- EXPECT_EQUAL(_old->getSchema().get(), _new->getSchema().get());
- }
void expect_not_equal_schema() {
EXPECT_NOT_EQUAL(_old->getSchema().get(), _new->getSchema().get());
}
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
index 84bdff8c229..cf3dfec771a 100644
--- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
@@ -518,10 +518,6 @@ struct FixtureBase
_writeService.master().sync();
}
- void syncIndex() {
- _writeService.sync_all_executors();
- }
-
void sync() {
_writeServiceReal.sync_all_executors();
}
@@ -1153,7 +1149,7 @@ TEST_F("require that compactLidSpace() propagates to document meta store and doc
f.compactLidSpaceAndWait(2);
// performIndexForceCommit in index thread, then completion callback
// in master thread.
- EXPECT_TRUE(assertThreadObserver(7, 6, 6, f.writeServiceObserver()));
+ EXPECT_TRUE(assertThreadObserver(7, 7, 7, f.writeServiceObserver()));
EXPECT_EQUAL(2u, f.metaStoreObserver()._compactLidSpaceLidLimit);
EXPECT_EQUAL(2u, f.getDocumentStore()._compactLidSpaceLidLimit);
EXPECT_EQUAL(1u, f.metaStoreObserver()._holdUnblockShrinkLidSpaceCnt);
@@ -1171,7 +1167,7 @@ TEST_F("require that compactLidSpace() doesn't propagate to "
op.setSerialNum(0);
f.runInMaster([&] () { f.fv.handleCompactLidSpace(op); });
// Delayed holdUnblockShrinkLidSpace() in index thread, then master thread
- EXPECT_TRUE(assertThreadObserver(6, 5, 4, f.writeServiceObserver()));
+ EXPECT_TRUE(assertThreadObserver(6, 6, 5, f.writeServiceObserver()));
EXPECT_EQUAL(0u, f.metaStoreObserver()._compactLidSpaceLidLimit);
EXPECT_EQUAL(0u, f.getDocumentStore()._compactLidSpaceLidLimit);
EXPECT_EQUAL(0u, f.metaStoreObserver()._holdUnblockShrinkLidSpaceCnt);
diff --git a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
index eba87447f86..ade471317e8 100644
--- a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
@@ -14,6 +14,7 @@
#include <vespa/searchcore/proton/test/mock_summary_adapter.h>
#include <vespa/searchcore/proton/test/thread_utils.h>
#include <vespa/searchlib/index/docbuilder.h>
+#include <vespa/vespalib/util/destructor_callbacks.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/log/log.h>
@@ -245,8 +246,11 @@ struct FixtureBase {
}
void force_commit() {
- runInMaster([this] () { static_cast<IFeedView&>(*feedview).forceCommit(serial_num); });
- writeService.sync_all_executors();
+ vespalib::Gate gate;
+ runInMaster([this, &gate] () {
+ feedview->forceCommit(search::CommitParam(serial_num), std::make_shared<vespalib::GateCallback>(gate));
+ });
+ gate.await();
}
};