From 94487bd4005ea4360e53fa2adc84bd58d9809538 Mon Sep 17 00:00:00 2001 From: Abhishek Yadav Akkem Date: Tue, 18 Apr 2023 09:44:44 -0700 Subject: [PATCH 1/2] Code refactor for async method --- aws/metrics/test/metrics_manager_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/metrics/test/metrics_manager_test.cc b/aws/metrics/test/metrics_manager_test.cc index 6592ded5..0ac19d56 100644 --- a/aws/metrics/test/metrics_manager_test.cc +++ b/aws/metrics/test/metrics_manager_test.cc @@ -55,7 +55,7 @@ class MockCloudWatchClient : public Aws::CloudWatch::CloudWatchClient { const Aws::CloudWatch::Model::PutMetricDataRequest& request, const Aws::CloudWatch::PutMetricDataResponseReceivedHandler& handler, const std::shared_ptr& context - = nullptr) const override { + = nullptr) const { push(&requests_, request); executor_->submit([=] { if (num_failures_ <= 0) { From 0d30418a66745532fd05fcf49b007c3377ba07fc Mon Sep 17 00:00:00 2001 From: Abhishek Yadav Akkem Date: Tue, 18 Apr 2023 15:10:17 -0700 Subject: [PATCH 2/2] Code refactor for async method --- aws/kinesis/core/test/shard_map_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/kinesis/core/test/shard_map_test.cc b/aws/kinesis/core/test/shard_map_test.cc index 8f4d40a8..cd1e0a61 100644 --- a/aws/kinesis/core/test/shard_map_test.cc +++ b/aws/kinesis/core/test/shard_map_test.cc @@ -44,7 +44,7 @@ void pop(const std::list* q) { class MockKinesisClient : public Aws::Kinesis::KinesisClient { public: - MockKinesisClient( + MockKinesisClient ( std::list outcomes_list_shards, std::function callback_list_shards = []{}) : Aws::Kinesis::KinesisClient(kEmptyCreds, fake_client_cfg()), @@ -56,7 +56,7 @@ class MockKinesisClient : public Aws::Kinesis::KinesisClient { const Aws::Kinesis::Model::ListShardsRequest& request, const Aws::Kinesis::ListShardsResponseReceivedHandler& handler, const std::shared_ptr& context - = nullptr) const override { + = nullptr) const { executor_->schedule([=] { if (outcomes_list_shards_.size() == 0) {