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

Wait for session scenarios to send session before crashing #435

Merged
merged 1 commit into from
Feb 26, 2019

Conversation

fractalwrench
Copy link
Contributor

The E2E test job failed for Android 24 on CI only. I believe this is due to the native code killing the app before the session can be delivered, which is only an issue on Travis CI's slow ARM emulators.

The fix uses a handler to delay this crash for a reasonable period, meaning the session is always delivered in time. This mirrors the approach used in previous scenarios.

@@ -2,6 +2,8 @@ Feature: NDK Session Tracking

Scenario: Stopped session is not in payload of unhandled NDK error
When I run "CXXStopSessionScenario"
And I wait a bit
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this do, and why do we required two of them? Is it possible to detect if an app is running through CLI somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This step will wait for a set amount of time that is lower locally, but increased on CI. I believe it requires 2 as that's what was used in previous scenarios involving sessions and native errors.

wait_time = ENV['MAZE_WAIT_TIME'] || (RUNNING_CI ? '20' : '5')

I believe it might be possible to detect if an app is running through adb but we don't currently have that setup.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it relied on somewhere else as well, or could we just bump the time up in a single step?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe the timing is relied on in other places.

Copy link
Contributor

@Cawllec Cawllec left a comment

Choose a reason for hiding this comment

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

While we'll have to consider the waiting when it comes to v2 migration, I don't think we want to put effort into fixing things in Maze-Runner v1.

@fractalwrench fractalwrench merged commit eeed649 into stop-sessions Feb 26, 2019
@fractalwrench fractalwrench deleted the fix-ci branch February 26, 2019 14:42
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