Skip to content

move wait_for_shutdown() call out of the context manager#466

Merged
Karsten1987 merged 1 commit intomasterfrom
dirk-thomas/test-process-not-terminating
Jul 23, 2020
Merged

move wait_for_shutdown() call out of the context manager#466
Karsten1987 merged 1 commit intomasterfrom
dirk-thomas/test-process-not-terminating

Conversation

@dirk-thomas
Copy link
Copy Markdown
Member

@dirk-thomas dirk-thomas commented Jul 18, 2020

Hopefully fixes (no, it doesn't) #454 this time.

The subprocess started by launch_testing.tools.launch_process() is only signaled to terminate when the context exits. Therefore calling wait_for_shutdown() within the with block doesn't do anything but wait for the timeout. Afterwards it was a race if the process terminated quickly enough so that the file handles from the subprocess where released before the tear down function of the test tries to delete the temporary directory.

Moving the wait_for_shutdown() call outside the with block ensures to give the shutdown event enough time to be processed.

Windows build testing ros2bag with --retest-until-fail 10: Build Status

Full CI just because:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas dirk-thomas added the bug Something isn't working label Jul 18, 2020
@dirk-thomas dirk-thomas self-assigned this Jul 18, 2020
@dirk-thomas dirk-thomas requested a review from Karsten1987 July 18, 2020 05:50
@dirk-thomas
Copy link
Copy Markdown
Member Author

@Karsten1987 @emersonknapp Please continue looking into this issue. While this patch fixes the incorrect logic of the test it still fails on Windows due to being unable to delete the temporary directory. Since this is a the last failing test please try to resolve it within a week. Otherwise I am tempted to mark the test as xfail on Windows. Thanks.

@dirk-thomas dirk-thomas removed the request for review from Karsten1987 July 20, 2020 15:48
@emersonknapp
Copy link
Copy Markdown
Collaborator

Thanks for this! We are looking at it this week and will mark it xfail if we do not have a resolution by the end of the week.

@Karsten1987
Copy link
Copy Markdown
Collaborator

@emersonknapp is this good to go or do you guys have another round of review for this?

@emersonknapp
Copy link
Copy Markdown
Collaborator

It's good to go. We're working on fixing the test more thoroughly but this change is good.

@Karsten1987 Karsten1987 merged commit 7bc74c0 into master Jul 23, 2020
@Karsten1987 Karsten1987 deleted the dirk-thomas/test-process-not-terminating branch July 23, 2020 00:18
emersonknapp pushed a commit that referenced this pull request Feb 2, 2021
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
emersonknapp pushed a commit that referenced this pull request Feb 17, 2021
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
MichaelOrlov pushed a commit that referenced this pull request May 25, 2023
- test_record_qos_profiles failures is a known issue described in the
#454
- To fix those tests need to backport #462, #466, #470, #472, #525
- Skipping them for a while

Signed-off-by: Michael <michael.orlov@apex.ai>
MichaelOrlov pushed a commit that referenced this pull request May 25, 2023
- test_record_qos_profiles failures is a known issue described in the
#454
- To fix those tests need to backport #462, #466, #470, #472, #525
- Skipping them for a while

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
MichaelOrlov pushed a commit that referenced this pull request May 25, 2023
* Fix for CI regression in TestRos2BagRecord

- Replace get_actual_qos() to the qos_profile() as it was before #1335
For some reason on Foxy it doesn't work as expected. Probably due to the
missing some underlying dependencies in other core packages.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Revert "Fix for CI regression in TestRos2BagRecord"

This reverts commit f50f46a.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Skip test_record_qos_profiles on Windows since they are flaky

- test_record_qos_profiles failures is a known issue described in the
#454
- To fix those tests need to backport #462, #466, #470, #472, #525
- Skipping them for a while

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants