diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-11-30 08:49:06 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-11-30 08:49:06 +0000 |
commit | 1195f94bcba1366ac1e7f94c3c6d714fc2a1d8f8 (patch) | |
tree | 329556b8de2b711381d1f49b7812bbd041c1ee6e /searchcore/src/tests/proton/attribute/attributeflush_test.cpp | |
parent | dd67bb4a5b7b5ca609f32b6a0255db4ccc4abe6f (diff) |
Add DoneCallback to heartBeat so it can be tested without relying on sync.
Diffstat (limited to 'searchcore/src/tests/proton/attribute/attributeflush_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/attribute/attributeflush_test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp index e29040a7984..e85bf3c4baa 100644 --- a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp +++ b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp @@ -19,6 +19,7 @@ #include <vespa/vespalib/util/foregroundtaskexecutor.h> #include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/util/threadstackexecutor.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <thread> #include <vespa/log/log.h> @@ -568,13 +569,13 @@ Test::requireThatShrinkWorks() EXPECT_FALSE(av->canShrinkLidSpace()); EXPECT_EQUAL(1000u, av->getNumDocs()); EXPECT_EQUAL(100u, av->getCommittedDocIdLimit()); - aw.heartBeat(51); + aw.heartBeat(51, IDestructorCallback::SP()); EXPECT_TRUE(av->wantShrinkLidSpace()); EXPECT_FALSE(av->canShrinkLidSpace()); EXPECT_EQUAL(ft->getApproxMemoryGain().getBefore(), ft->getApproxMemoryGain().getAfter()); g.reset(); - aw.heartBeat(52); + aw.heartBeat(52, IDestructorCallback::SP()); EXPECT_TRUE(av->wantShrinkLidSpace()); EXPECT_TRUE(av->canShrinkLidSpace()); EXPECT_TRUE(ft->getApproxMemoryGain().getBefore() > |