-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Genycloud teardown #2471
Genycloud teardown #2471
Conversation
adc6f1f
to
fa0aecd
Compare
} catch (error) { | ||
log.warn({ event: 'GLOBAL_CLEANUP' }, 'An error occurred trying to shut down Genymotion-cloud emulator instances!', error); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noomorph if you have any better suggestions as to how to provide this in a cleaner way (leaving the TODO note aside, however), I'd be happy to hear them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could add a link to the instance's web GUI, so it would be easy to open and examine it.
Also, it might be a good idea to add that link when a cloud emulator spins up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will do both!
@@ -47,7 +51,7 @@ class GenyCloudDeviceAllocator extends AndroidDeviceAllocator { | |||
} | |||
|
|||
const options = { | |||
backoff: 'none', | |||
backoff: 'none', // TODO apply reverse-linear polling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is reverse-linear polling? backoff strategy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly
42885f6
to
17593a5
Compare
17593a5
to
7f5f5e9
Compare
This reverts commit 42885f6.
Description
Another (mandatory) step towards support for Genymotion's SaaS solution (see #2429): supporting tear-down.
One of the most important aspects of using cloud emulators is the proper management of their deletion (in particular, because pricing is usage-time based). This change introduces instances deletion that in a Jest-based environment, is based on the global-teardown hook, with the API invocation looking pretty much like this:
Namely, such that the internal details of the shutdown are obscure from the Detox user's perspective, and are available through an API that feels natural.
Underneath, what happens in a nutshell is this:
uuid
to the device-registry.Promise.all()
fashion.Last but not least, this also adds support for
driver.shutdown()
, such that genymotion-cloud testing would respect Detox'--cleanup
argument.