Alexey Serbin has uploaded this change for review. ( 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. I also snuck in a few other minor updates, such as replacing ScopedCleanup with unique_ptr wrapper where applicable and a few nits related to the code style guide. Change-Id: Ibfd24323f35e3504f05f3cf875098637853c8c3c --- M src/kudu/client/client-test.cc M src/kudu/client/client.cc M src/kudu/client/scan_token-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/tools/tool_action_fs.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 17 files changed, 98 insertions(+), 65 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/26/22426/1 -- 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: newchange Gerrit-Change-Id: Ibfd24323f35e3504f05f3cf875098637853c8c3c Gerrit-Change-Number: 22426 Gerrit-PatchSet: 1 Gerrit-Owner: Alexey Serbin <[email protected]>
