Skip to content

Commit

Permalink
Merge pull request #495 from awslabs/Async_refactor
Browse files Browse the repository at this point in the history
Code refactor for async method
  • Loading branch information
aakkem authored Apr 18, 2023
2 parents b7d757d + 0d30418 commit 6386c9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions aws/kinesis/core/test/shard_map_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void pop(const std::list<T>* q) {

class MockKinesisClient : public Aws::Kinesis::KinesisClient {
public:
MockKinesisClient(
MockKinesisClient (
std::list<Aws::Kinesis::Model::ListShardsOutcome> outcomes_list_shards,
std::function<void ()> callback_list_shards = []{})
: Aws::Kinesis::KinesisClient(kEmptyCreds, fake_client_cfg()),
Expand All @@ -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<const Aws::Client::AsyncCallerContext>& context
= nullptr) const override {
= nullptr) const {
executor_->schedule([=] {

if (outcomes_list_shards_.size() == 0) {
Expand Down
2 changes: 1 addition & 1 deletion aws/metrics/test/metrics_manager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<const Aws::Client::AsyncCallerContext>& context
= nullptr) const override {
= nullptr) const {
push(&requests_, request);
executor_->submit([=] {
if (num_failures_ <= 0) {
Expand Down

0 comments on commit 6386c9c

Please sign in to comment.