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

Improve integration tests, add integration tests to CI #642

Merged
merged 52 commits into from
May 16, 2019

Conversation

julianoes
Copy link
Collaborator

Before we're able to enable all integration tests in CI we need to make sure they pass.

Addresses #639.

@julianoes julianoes force-pushed the improve-integration-tests branch 3 times, most recently from c3ab360 to 8dc2b05 Compare January 21, 2019 13:49
JonasVautherin
JonasVautherin previously approved these changes Jan 22, 2019
@julianoes
Copy link
Collaborator Author

Note to self:
SitlTest.MissionWithRTLHigh don't wait until they are landed.

julianoes added 13 commits May 15, 2019 10:09
This improves some printfs, makes sure flags used by different threads
are atomic, and waits longer for altitude checks in order to pass them.
We shouldn't be doing a sync call inside a async call, therefore, we now
move that to the thread pool.
This adds a simple helper that polls until a condition is true.
Instead of calling the callback directly on the receiver thread we are
now using the thread pool which means that we don't block the receiver
thread if the user does something involved in the callback.

Also, by making a copy before passing the callback to the thread pool,
we enable the subscription to cancel or change itself. For instance
using `nullptr` a subscription can cancel itself again if it no longer
needs updates.
This adds a helper function to check for a condition at 1/10 of the
timeout until the timeout.
We should abort a test if we don't find a system.
Otherwise, we don't manage to land in time.
Eventually this `has_gimbal` check needs to be smart enough to know if
there is a gimbal connected to the autopilot.
@julianoes julianoes force-pushed the improve-integration-tests branch from 430b9fa to a54fde9 Compare May 15, 2019 08:12
@julianoes julianoes changed the title [WIP] Improve integration tests Improve integration tests, add integration tests to CI May 15, 2019
@julianoes julianoes force-pushed the improve-integration-tests branch 2 times, most recently from 3d51cc8 to aea5783 Compare May 15, 2019 12:15
@julianoes julianoes force-pushed the improve-integration-tests branch from aea5783 to 2dd5c3f Compare May 15, 2019 12:50
@julianoes julianoes force-pushed the improve-integration-tests branch from b5ef6c8 to f87b006 Compare May 16, 2019 06:44
@julianoes
Copy link
Collaborator Author

@JonasVautherin it's passing! Want to review? 😄

Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

Nice! Thanks a lot!

LogWarn() << "Speed should be: " << speed_correct << " m/s, "
<< "actually: " << speed_actual << " m/s";
}
// TODO: enable these again with a better check not susceptible to time.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we keep that disabled as well?

@julianoes julianoes merged commit 64c7252 into develop May 16, 2019
@julianoes julianoes deleted the improve-integration-tests branch May 16, 2019 08:47
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