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

[19889] FileWatchTest fix for github windows ci #4016

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Conversation

Mario-DL
Copy link
Member

@Mario-DL Mario-DL commented Nov 14, 2023

Description

This PR introduces a fix for the SystemInfoTests.FileWatchTest. Under some circumstances, specially when the test is executed in a low resources context (1~2 cores) and a windows machine, the first write operation in the file can be performed before the watch_thread reaches the WaitForMultipleObjects() call. Hence, the event of changing the file is lost and the test fails with timeout.

The fix simply introduces an initial waiting time before performing the first write operation, giving enough time for the watch_thread() to be correctly scoping for directory changes.

@Mergifyio backport 2.11.x 2.10.x 2.6.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • Changes are ABI compatible.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
@Mario-DL Mario-DL added the ci-pending PR which CI is running label Nov 14, 2023
@Mario-DL Mario-DL added this to the v2.13.0 milestone Nov 14, 2023
@EduPonz EduPonz modified the milestones: v2.13.0, v2.12.1 Nov 14, 2023
@JesusPoderoso JesusPoderoso added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Nov 14, 2023
@EduPonz EduPonz merged commit c216133 into master Nov 14, 2023
10 of 14 checks passed
@EduPonz EduPonz deleted the fix/filewatch-test branch November 14, 2023 11:35
@EduPonz
Copy link

EduPonz commented Nov 14, 2023

@Mergifyio backport 2.11.x 2.10.x 2.6.x

Copy link
Contributor

mergify bot commented Nov 14, 2023

backport 2.11.x 2.10.x 2.6.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 14, 2023
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit c216133)
MiguelCompany pushed a commit that referenced this pull request Dec 1, 2023
* FileWatchTest fix for github windows CI (#4016)

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit c216133)

* Backport test fix

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Co-authored-by: Mario Dominguez <mariodominguez@eprosima.com>
EduPonz pushed a commit that referenced this pull request Dec 2, 2023
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit c216133)
EduPonz pushed a commit that referenced this pull request Dec 3, 2023
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit c216133)

Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
cferreiragonz pushed a commit that referenced this pull request Dec 5, 2023
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit c216133)
EduPonz pushed a commit that referenced this pull request Dec 11, 2023
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit c216133)

Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants