Skip to content

Conversation

@ethouris
Copy link
Collaborator

Fixed tests:

  1. TestConnectionTimeout.BlockingLoop

This test was incorrectly reusing once created socket to do connection failure tests. This test didn't work correctly in case when connection somehow succeeded, and it breaks the rule that a socket should be used for connection, and then whether it succeeds or not, it should be used for connection possibly, and then closed - not connected multiple times after a failure.

  1. Bonding.ConnectNonBlocking

This test was often failing in Travis because it relies too much on timing: connection is expected to return an error code if it is in progress, but for this the peer (running in a thread here) should not accept the connection until this check was done. Therefore there are needed synchronization points in the form of the promise. This prevents from both premature closing and getting things in the state that was not yet the expected one.

@ethouris ethouris added Type: Maintenance Work required to maintain or clean up the code [tests] Area: Unit tests labels Mar 13, 2025
@ethouris ethouris added this to the v1.5.5 milestone Mar 13, 2025
@cl-ment cl-ment merged commit ee03ae9 into Haivision:master Mar 14, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[tests] Area: Unit tests Type: Maintenance Work required to maintain or clean up the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants