Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Timeout when adding package with prompts #15

Open
kimroen opened this issue Sep 17, 2017 · 3 comments
Open

Timeout when adding package with prompts #15

kimroen opened this issue Sep 17, 2017 · 3 comments

Comments

@kimroen
Copy link

kimroen commented Sep 17, 2017

The installer for an addon might try to add some files to your addon. If the addon already has those files, you'll get prompts like these:

Overwrite path/to/file.js? (Yndeh)

This is fine in normal circumstances, but if you specify this addon as a package to be installed in your setupTest, the test will time out on this prompt with not much to go on:

index "before all" hook:
     Error: Timeout of 600000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

I'm having a hard time coming up with suggestions on how to resolve this, because the various use cases will surely want to handle it in different ways. In my case, I don't want to overwrite the file, because I've supplied the file in my fixture the way I want to have it.

@kimroen
Copy link
Author

kimroen commented Sep 17, 2017

The particular use case I am having is in this PR: kimroen/ember-cli-document-title#62

I'm trying to add ember-cli-head as a dependecy in the test, which requires me to create an app/templates/head.hbs file. The test times out on the prompt Overwrite app/templates/head.hbs? (Yndeh).

This can be seen by turning on debug for both ember-fastboot-addon-tests and ember-cli-addon-tests:

DEBUG=ember-fastboot-addon-tests,ember-cli-addon-tests ember fastboot:test

If I kill the right ember process at the right time, the test completes.

@simonihmig
Copy link
Member

I see that this is a problem, had this in my mind already, but I don't see an easy solution as well...

The underlying problem is more related to ember-cli-addon-tests, which does the heavy lifting here. Created an issue there: tomdale/ember-cli-addon-tests#157

@kimroen
Copy link
Author

kimroen commented Sep 18, 2017

Thank you for raising the issue in the appropriate place. I'll try to think of a workaround for now, but I'd be very curious about what a good API could be from the perspective of this addon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants