-
Notifications
You must be signed in to change notification settings - Fork 11.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
OSX master branch unit test errors #4515
Comments
I have unfortunately no clue how to fix these errors. I can submit test resulta for latest master if that helps. |
Sure, it'd be helpful to confirm if this is still an issue after recent changes Unfortunately I'd have a hard time fixing this one too since I develop on Linux |
I'm still seeing 40 unit test errors on ff and chrome each on my local machine. To make this a little more accessible- would you mind if I tried to beef the travis integration to automatically run the tests on OSX, too? Not sure this is entirely feasible but I could at least try? |
That would be great if only unit tests ( |
Interesting that it's still broken on OSX. I tested the latest stuff locally and the errors I was seeing are gone. @andig what version of OSX, Chrome, and FF do you have on your system? |
OSX: Sierra 10.12.6 I'll check if I can wip up a simple, unit-test only OSX build to run by default. I have some experience with tricky travis-ci setups. |
Here is a hacked-up version of the travis build for linux plus osx: https://travis-ci.org/andig/Chart.js/builds/260713745 The osx build only runs the unit test. It is unfortunately much slower than linux as resources are scarce. It should be good enough to get a first impression though. The deployment part is currently missing but can easily be added back in. |
Though the goal is not to maintain a tricky Travis config ;) We spent lot of time to get this build/deploy/release process stable, I really don't want to deal with a broken config for future release. |
Thats up to you. Unfortunately travis has no straightforward way to configure this buidl :/ I could offer to run osx from my repo and post results from time to time but that would make catching errors harder. |
I checked the build logs you posted in your first message and it seems that unit tests based on images comparison are failing, but we can't see the error output (image diff). Can you post a screenshot of one of these tests? |
I've look through the various config files but couldn't figure out where to find those? |
You need to run |
Looking at the other failing tests, it seems that all expect a canvas with half the render size, so that might be because your device has a pixel ratio of config.options.devicePixelRatio = 1; |
I'll check. Funny enough I just got a working build on travis without this change: https://travis-ci.org/andig/Chart.js/builds/261027889. Makes it look more like a timing issue? |
Update: you're on the right track after all. Travis OSX: 100% success. Might be a non-retina device. Local build without your fix:
With fix:
The failed tests are any variety, here is some examples:
|
Actually, I'm also getting these failures if I apply the suggested changes locally. I'm not sure if it's possible to change the browser device aspect ratio manually, but let's try to set |
Better:
|
And here's the complete remaining list:
A bit confusing that the |
Did you remove |
Ehrm no. Doing so limits it to one failure locally:
Still don't get why momentjs should depend on that? |
That looks like to a rounding issue, you could change these tests for:
I don't know about the moment stuff, that's just warnings. |
Success. This makes the OSX travis build obsolete as it didn't catch the retina errors anyway. Do you want me to send a PR for the changes or update yourself? Or rather: are these fixes "ok" for running chartjs on a retina/highres device, i.e. did we just hack it to pass or are the test cases just not taking retina into account in their expectations? |
Sounds good, can you PR these changes? Most unit tests assume a DPR of |
Agree for the OSX Travis builds: we ship a JS library (not binaries) so for a given browser/version, our code should run and render the same whatever the platform is (I guess Chrome/FF have their own cross platform unit tests). If there is a difference between Chrome 59 under Linux and OSX, I think we can assume that's an issue with the browser itself, not with Chart.js. |
Learned so much again, THANKS! |
It makes our tests more reliable, thank you for the time spent on it. |
Great find @simonbrunel @andig. This explains why I didn't see these failures on my MBP as it's old and doesn't have a retina display. |
These are as of b03ab1c, split by Chrome and FireFox. Please let me know how I can contribute.
Chrome: https://pastebin.com/eJNMZNUa
Firefox: https://pastebin.com/9CsAiWgD
The text was updated successfully, but these errors were encountered: