The shared MQTT311 tests are consistently flaky. This PR is an attempt to uncover/resolve this flakiness. After completing the refactor, I have not observed any test failures across a decent number of full CI re-runs.
This PR refactors the tests in several ways:
Try-blocks for all promise executor functions leading to rejections. This keeps exceptions from disrupting anything outside the promise.
Drops all truthy resolution checks. Awaiting the promise is sufficient.
Rewrites the tests to use a top-down procedural style for clarity of ordering. Step-by-step awaits are not how you'd write a real application, but for tests, they make following the control flow and expectations much easier.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
The shared MQTT311 tests are consistently flaky. This PR is an attempt to uncover/resolve this flakiness. After completing the refactor, I have not observed any test failures across a decent number of full CI re-runs.
This PR refactors the tests in several ways:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.