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 flaky triggered camera integration test #1895

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Feb 14, 2023

🦟 Bug fix

Fixes #1894

Summary

The triggered camera integration test is flaky in CI builds. Occasionally requests fail to trigger camera callbacks.

The console output suggests that the tests are being run before the rendering thread is initialized. So this PR attempts to fix the test by adding logic to wait for render events to be fired first (this means rendering thread is ready) before proceeding to check for triggered camera callbacks.

Console output from failed CI run - last two lines indicate rendering thread initialized too late:

243: [Dbg] [Sensors.cc:240] Initializing render context
243: [Msg] Loading plugin [ignition-rendering-ogre2]
243: /home/jenkins/workspace/ignition_gazebo-ci-ign-gazebo6-focal-amd64/ign-gazebo/test/integration/triggered_camera.cc:105: Failure
243: Expected: (sleep) < (maxSleep), actual: 30 vs 30
243: /home/jenkins/workspace/ignition_gazebo-ci-ign-gazebo6-focal-amd64/ign-gazebo/test/integration/triggered_camera.cc:106: Failure
243: Expected: (imageBuffer) != (nullptr), actual: NULL vs (nullptr)
243: [Dbg] [Sensors.cc:406] SensorsPrivate::Stop
243: [Dbg] [RenderUtil.cc:2542] Create scene [scene]
243: [Dbg] [Sensors.cc:254] Rendering Thread initialized

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@iche033 iche033 requested a review from mjcarroll as a code owner February 14, 2023 00:27
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Feb 14, 2023
@mjcarroll mjcarroll merged commit 1406df1 into ign-gazebo6 Feb 14, 2023
@mjcarroll mjcarroll deleted the fix_triggered_camera_test branch February 14, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants