awslabs / aws-c-mqtt

C99 implementation of the MQTT 3.1.1 specification.
Apache License 2.0
93 stars 30 forks source link

Use UUID for socket endpoints #283

Closed TwistedTwigleg closed 1 year ago

TwistedTwigleg commented 1 year ago

Description of changes:

Adjust tests to use UUID instead of timestamps for socket endpoints, preventing any overlap if two tests run in parallel or at the exact same timestamp clock sample.


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

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +0.04 :tada:

Comparison is base (8c520b3) 81.17% compared to head (4a408df) 81.22%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #283 +/- ## ========================================== + Coverage 81.17% 81.22% +0.04% ========================================== Files 18 18 Lines 7311 7311 ========================================== + Hits 5935 5938 +3 + Misses 1376 1373 -3 ``` [see 1 file with indirect coverage changes](https://app.codecov.io/gh/awslabs/aws-c-mqtt/pull/283/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

TwistedTwigleg commented 1 year ago

If we keep it the same though, wouldn't that still have the issue where tests running in parallel or during the same milliseconds would have the same socket endpoint?

bretambrose commented 1 year ago

If we keep it the same though, wouldn't that still have the issue where tests running in parallel or during the same milliseconds would have the same socket endpoint?

They'd use the uuid

TwistedTwigleg commented 1 year ago

Thanks! Merging into main...