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

Running example results in incostenties with timeouts and infinite loops #10

Open
JPtenBerge opened this issue May 28, 2019 · 12 comments
Open

Comments

@JPtenBerge
Copy link

JPtenBerge commented May 28, 2019

Since our back-and-forth yesterday in the Cypress repo, I'm now trying get the example specs to run properly. I hadn't updated Node.js yet yesterday, I've now done that as well. So I'm now running on the latest Node.js, Cypress and your plugin. This is what's happening for me when I run the example specs twice:

Me running the example specs twice

Timeouts, errors and the second run resulted in an infinite loop where the first run didn't. These are the exact steps I've taken:

git clone https://github.com/JaySunSyn/cypress-daywalker.git
cd cypress-daywalker\example
npm i
npm test
Click on example_spec js in Cypress window
(wait for tests to complete)
Click the reload button in the browser

Also, I noticed in your screen gif is that all tests take just under 15 seconds to complete, while one run for me takes over 90 seconds. I'm running on a high-end business laptop, it's a three month old Dell Latitude 5591 with 16GB RAM, 2.60GHz i7, SSD, all great specs. I don't understand the massive difference.

@JaySunSyn
Copy link
Owner

Hmmm could you find this file in your node_modules and comment this out:

example/node_modules/@polymer/font-roboto/roboto.js

if (!window.polymerSkipLoadingFontRoboto) {
  // const link = document.createElement('link');
  // link.rel = 'stylesheet';
  // link.type = 'text/css';
  // link.crossOrigin = 'anonymous';
  // link.href =
  //     'https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic';
  // document.head.appendChild(link);
}

Does it make a difference if you re-run the test?

@JaySunSyn
Copy link
Owner

I've pushed a fix to master to skip loading those fonts.

@JaySunSyn
Copy link
Owner

In your node_modules is cypress-daywalker version 0.1.1 installed, right?

@JPtenBerge
Copy link
Author

JPtenBerge commented May 29, 2019

In your node_modules is cypress-daywalker version 0.1.1 installed, right?

Yep.

"devDependencies": {
    "cypress": "^3.2.0",
    "cypress-daywalker": "^0.1.1",
    "npm-run-all": "^4.1.3"
}

I've tried commenting out those lines inside roboto.js, but that did nothing. Same inconsistencies. Buuuuut. Then I took your second suggestion:

window.polymerSkipLoadingFontRoboto = true;

And the first and second run were all green!

image

I wanted to rule out any luck, so I set out that it had to be all green for at least 10 runs. And sadly, on the third run things broke again.

image

4th run was all green, 5th run had 1 failing test, 6th and 7th run were all green, 8th run resulted in an infinite loop.

All in all, it seems that not loading fonts shaves a bit of time off, making test results more green, but timeout problems still occur. The total running time is now just under 80 seconds when they pass. When they fail, they're just under 90.

@JPtenBerge JPtenBerge changed the title Inconsistent example results in timeout and infinite loop Running example results in incostenties with timeouts and infinite loops May 30, 2019
@JaySunSyn
Copy link
Owner

Please confirm if this is still the case with version 0.2.1

@JaySunSyn
Copy link
Owner

JaySunSyn commented Aug 23, 2019

Closing this issue.

Tests are now succeeding consistently as per https://travis-ci.com/JaySunSyn/cypress-daywalker/builds/

Feel free to re-open.

@JPtenBerge
Copy link
Author

JPtenBerge commented Aug 29, 2019

@JaySunSyn It took me a while, but I've tested it with version 0.2.1. Sadly, exactly the same results as before: inconsistent timeouts. I'd reopen, but can't if I didn't close it myself.

@JaySunSyn
Copy link
Owner

I will now run the tests daily here https://travis-ci.com/JaySunSyn/cypress-daywalker/builds so we can check if tests fail once in a while but so far, they did not.

I've also run them around 10 times locally just now and they succeed...

I guess you did this:

git checkout master && git pull && cd example && npm install && npm run test

correct?

@JaySunSyn JaySunSyn reopened this Aug 30, 2019
@JPtenBerge
Copy link
Author

JPtenBerge commented Aug 30, 2019

I will now run the tests daily here https://travis-ci.com/JaySunSyn/cypress-daywalker/builds so we can check if tests fail once in a while but so far, they did not.

I've also run them around 10 times locally just now and they succeed...

I'm truly curious what it could be, why it's so much slower on my machine and not on yours. Is it a software thing? A hardware thing? A Windows thing?

I guess you did this:

git checkout master && git pull && cd example && npm install && npm run test

correct?

That, and then I noticed it installed 0.2.0 of your plugin, so I explicitly installed 0.2.1 and then ran npm run test again.

@JaySunSyn
Copy link
Owner

Not sure, but here are my specs:

image

With now 0.2.1 installed, same issue?

@JPtenBerge
Copy link
Author

JPtenBerge commented Sep 13, 2019

Not sure, but here are my specs:

image

With now 0.2.1 installed, same issue?

Sorry for the late response, a bit busy here. But yep, I used 0.2.1 with my latest try. As for my specs:

image

And I have an SSD (Samsung PM981 512GB) and an NVIDIA GeForce MX130 video card as well as the Intel Integrated UHD Graphics.

@JaySunSyn
Copy link
Owner

Hmm, shouldn't matter much. You can check out here how long the tests took to run on a travis runner https://travis-ci.com/JaySunSyn/cypress-daywalker/builds/127339626#L348

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