Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22426 )
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]> --- 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: Alexey Serbin: Verified Yifan Zhang: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/22426 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibfd24323f35e3504f05f3cf875098637853c8c3c Gerrit-Change-Number: 22426 Gerrit-PatchSet: 3 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]>
