Skip to content

Commit

Permalink
Log outbound payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Bret Ambrose committed Oct 7, 2024
1 parent f326120 commit e40192f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/MqttRequestResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ static int s_SubmitGetNamedShadowRejectedRequest(TestContext &context, TestState

int result = context.client->SubmitRequest(
requestOptions,
[state, rawResponseTracker](Aws::Iot::RequestResponse::UnmodeledResult &&result)
[rawResponseTracker](Aws::Iot::RequestResponse::UnmodeledResult &&result)
{ s_onRequestComplete(std::move(result), rawResponseTracker); });
ASSERT_INT_EQUALS(AWS_OP_SUCCESS, result);

Expand Down Expand Up @@ -543,6 +543,8 @@ static int s_SubmitUpdateNamedShadowAcceptedRequest(TestContext &context, TestSt
snprintf(payload, AWS_ARRAY_SIZE(payload), "{\"state\":{\"desired\":\"%s\"}}", desiredState);
}

AWS_LOGF_INFO(AWS_LS_MQTT_GENERAL, "***UpdateNamedShadowPayload: %s", payload);

requestOptions.serialized_request = aws_byte_cursor_from_c_str(payload);

requestOptions.response_paths = responsePaths;
Expand All @@ -560,7 +562,7 @@ static int s_SubmitUpdateNamedShadowAcceptedRequest(TestContext &context, TestSt

int result = context.client->SubmitRequest(
requestOptions,
[state, rawResponseTracker](Aws::Iot::RequestResponse::UnmodeledResult &&result)
[rawResponseTracker](Aws::Iot::RequestResponse::UnmodeledResult &&result)
{ s_onRequestComplete(std::move(result), rawResponseTracker); });
ASSERT_INT_EQUALS(AWS_OP_SUCCESS, result);

Expand Down Expand Up @@ -680,7 +682,7 @@ static int s_SubmitGetNamedShadowTimeoutRequest(TestContext &context, TestState

int result = context.client->SubmitRequest(
requestOptions,
[state, rawResponseTracker](Aws::Iot::RequestResponse::UnmodeledResult &&result)
[rawResponseTracker](Aws::Iot::RequestResponse::UnmodeledResult &&result)
{ s_onRequestComplete(std::move(result), rawResponseTracker); });
ASSERT_INT_EQUALS(AWS_OP_SUCCESS, result);

Expand Down Expand Up @@ -792,7 +794,7 @@ static int s_SubmitGetNamedShadowFailureOnCloseRequest(TestContext &context, Tes

int result = context.client->SubmitRequest(
requestOptions,
[state, rawResponseTracker](Aws::Iot::RequestResponse::UnmodeledResult &&result)
[rawResponseTracker](Aws::Iot::RequestResponse::UnmodeledResult &&result)
{ s_onRequestComplete(std::move(result), rawResponseTracker); });
ASSERT_INT_EQUALS(AWS_OP_SUCCESS, result);

Expand Down

0 comments on commit e40192f

Please sign in to comment.