Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/22446 )

Change subject: [util] introduce ScopedCleanup::run()
......................................................................

[util] introduce ScopedCleanup::run()

In many test scenarios, the code run by ScopedCleanup instance was
duplicated at call sites of the ScopedCleanup::cancel() method.  This
patch introduces ScopedCleanup::run() method that invokes the registered
cleanup functor to use in such cases and also updates corresponding
code to call this new method instead.  Unit tests to cover the newly
introduced functionality are added as well.

Change-Id: Ibfd24323f35e3504f05f3cf875098637853c8c3c
Reviewed-on: http://gerrit.cloudera.org:8080/22426
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Yifan Zhang <[email protected]>
(cherry picked from commit 83e5a73e2f6ac42925a7a97a203644438cffe6da)
Reviewed-on: http://gerrit.cloudera.org:8080/22446
---
M src/kudu/client/client-test.cc
M src/kudu/integration-tests/exactly_once_writes-itest.cc
M src/kudu/integration-tests/raft_consensus-itest.cc
M src/kudu/integration-tests/txn_participant-itest.cc
M src/kudu/integration-tests/txn_status_manager-itest.cc
M src/kudu/integration-tests/txn_write_ops-itest.cc
M src/kudu/master/dynamic_multi_master-test.cc
M src/kudu/rpc/rpc-test.cc
M src/kudu/tablet/diff_scan-test.cc
M src/kudu/tools/rebalancer_tool-test.cc
M src/kudu/util/net/dns_resolver-test.cc
M src/kudu/util/net/socket-test.cc
M src/kudu/util/scoped_cleanup-test.cc
M src/kudu/util/scoped_cleanup.h
14 files changed, 93 insertions(+), 55 deletions(-)

Approvals:
  Yifan Zhang: Looks good to me, approved
  Alexey Serbin: Verified

--
To view, visit http://gerrit.cloudera.org:8080/22446
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfd24323f35e3504f05f3cf875098637853c8c3c
Gerrit-Change-Number: 22446
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <[email protected]>

Reply via email to