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

Jasmine times out when running protractor-perf test as part of a bigger suite of specs #31

Open
stoilsky opened this issue May 26, 2016 · 2 comments

Comments

@stoilsky
Copy link

I'm working on a suite of protractor specs where the majority test spec are 'regular' (non-perf). Only one spec uses protractor-perf. Nevertheless I use the protractor-perf runner for the entire suite because I don't want to switch between two different runners and I don't want to maintain two separate jasmine/protractor config files.

The Performance spec runs successfully on its own and runs successfully when it's the first spec that runs. However, when it's the last spec it fails with the following error:
Message: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. at [object Object]._onTimeout (c:\kindl\test\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1812:23)

The browser just sits and hangs. At the moment I'm working around the issue by simple putting the Perf spec as the first spec in the suite. But I would like to have a proper solution.

Thanks for your help,
Stoil

@axemclion
Copy link
Owner

@stoich Do you have an example of this test suite that I can look into ?

@stoilsky
Copy link
Author

I can't provide the actual test suite because of security limitations. I've created a sample which exhibits a similar issue. You can take a look here: https://drive.google.com/file/d/0B-p_FKXYznm5bkhVSmVTSWgwM0U/view?usp=sharing

As you can see I've wrapped protractor-perf in my own PerformanceMonitor class which I also use in my 'real' test suite.

The sample fails with an out of memory exception which I've also experienced with the real suite. However, it runs successfully if you make Performance the first spec in the Config.js file. It runs against Angular2 which might be part of the issue.

Thanks for you help.

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

2 participants