summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/docsummary
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2021-11-15 23:34:24 +0100
committerTor Egge <Tor.Egge@online.no>2021-11-15 23:34:24 +0100
commitc2b4b9aae6d368c819a823032fd1efe655c766c7 (patch)
treee9e5acc441af87042ce7ed056fc16b581eb5ce9e /searchcore/src/tests/proton/docsummary
parentce119ff35b16ce80b14a6d864eab614529d43dcb (diff)
Use braces to signal lifetime.
Diffstat (limited to 'searchcore/src/tests/proton/docsummary')
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index 2e78c204b56..d190d39ff80 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -705,15 +705,16 @@ TEST("requireThatAttributesAreUsed")
auto bjTensorAttr = dynamic_cast<search::tensor::TensorAttribute *>(bjAttr);
vespalib::Gate gate;
- auto on_write_done = std::make_shared<GateCallback>(gate);
- attributeFieldWriter.execute(attributeFieldWriter.getExecutorIdFromName(bjAttr->getNamePrefix()),
- [&, on_write_done]() {
- (void) on_write_done;
- bjTensorAttr->setTensor(3, *make_tensor(TensorSpec("tensor(x{},y{})")
+ {
+ auto on_write_done = std::make_shared<GateCallback>(gate);
+ attributeFieldWriter.execute(attributeFieldWriter.getExecutorIdFromName(bjAttr->getNamePrefix()),
+ [&, on_write_done]() {
+ (void) on_write_done;
+ bjTensorAttr->setTensor(3, *make_tensor(TensorSpec("tensor(x{},y{})")
.add({{"x", "a"}, {"y", "b"}}, 4)));
- bjTensorAttr->commit();
+ bjTensorAttr->commit();
});
- on_write_done.reset();
+ }
gate.await();
DocsumReply::UP rep2 = dc._ddb->getDocsums(req);