Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for CoapEndpointSpec test when transport becomes not ready #61

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

davidahouse
Copy link
Collaborator

This PR updates the test rejects requests when transport becomes not ready after requests started to change the response delay time which fixes the race condition.

By setting the response to return after the test timeout, we ensure that the test has enough time to receive the notReady signal. Otherwise you can get an incorrect response due to the notReady signal and default response time being very close. This doesn't increase the time the test will run because the notReady signal is sent in 20ms. The longest time this test could run is 10s, but that is only if the signal fails to be sent and captured correctly (aka a completely broken test).

This PR also re-enables the test so it will start executing on the CI.

Copy link
Contributor

@mikehuovila mikehuovila left a comment

Choose a reason for hiding this comment

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

LGTM

@davidahouse davidahouse merged commit 2ca787b into master Nov 1, 2022
@davidahouse davidahouse deleted the house/fix-for-coapendpointspec-test branch November 1, 2022 12:27
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