Skip to content

Mqtt test refactor#818

Open
bretambrose wants to merge 23 commits intomainfrom
MqttTestRefactor
Open

Mqtt test refactor#818
bretambrose wants to merge 23 commits intomainfrom
MqttTestRefactor

Conversation

@bretambrose
Copy link
Contributor

Refactors MQTT5 tests to

  1. Share connection configuration logic rather than repeat it
  2. Use IoT Core for integration tests that do not require special circumstances that IoT Core cannot support

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bretambrose bretambrose marked this pull request as ready for review February 13, 2026 22:26
Copy link
Contributor

@xiazhvera xiazhvera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some minor comments.

/*
* [ConnNegativeID-UC4] Client connect with socket timeout
*/
static int s_TestMqtt5SocketTimeout(Aws::Crt::Allocator *allocator, void *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we remove the socket timeout test? It was there to verify the failure path and that the error code was bound properly. I think it's still needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not reliable in CI and I don't know of an endpoint we can use that would be reliable.

ASSERT_TRUE(connection1Promise.get_future().get());
ASSERT_TRUE(testContext1.connectionPromise.get_future().get());

testContext1.connectionPromise = std::promise<bool>{};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem like we need to reset the promise for client1 again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be tripped and when it does it crashes the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants