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

Emulator: ensure -> reset workflow is inefficient #47

Open
baltpeter opened this issue Mar 14, 2023 · 0 comments
Open

Emulator: ensure -> reset workflow is inefficient #47

baltpeter opened this issue Mar 14, 2023 · 0 comments

Comments

@baltpeter
Copy link
Member

If you want to use an emulator, you would typically first call ensureDevice() and then resetDevice(), just like we do in the example:

await android.ensureDevice();
await android.resetDevice(process.argv[4] || 'your-snapshot');

However, that is quite inefficient. With #27, we're starting to do quite a bit of prep work in ensureDevice(), like installing WireGuard. It's pretty silly to do that only to then immediately reset the emulator to a snapshot (which itself will call ensureDevice()).

But you can't just skip the first ensureDevice() call either since we do want to assert that the device is ready. Maybe we want to add a prepare: boolean parameter that defaults to true?

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

No branches or pull requests

1 participant