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

Github Actions: Fix coverage task #1815

Open
rwaldron opened this issue Feb 18, 2023 · 4 comments
Open

Github Actions: Fix coverage task #1815

rwaldron opened this issue Feb 18, 2023 · 4 comments

Comments

@rwaldron
Copy link
Owner

No description provided.

@dtex
Copy link
Collaborator

dtex commented Feb 19, 2023

There are a couple of things I'm noticing.

First, when running npm test locally, my machine reports a failure on the sip.js IMU -- BNO055 data test. By the time the setInterval callback has fired on my machine, the i2cReadOnce stub has been called two or three times. Note that before the setInterval call, the callCount is zero. This change gets past that, but then the callCount is off which causes the tests to fail. We need to find out why i2cReadOnce is firing multiple times in the 11-12 ms it takes for the callback to be triggered, decide if that is expected behavior, and then re-swizzle this test.

@scottgonzalez Do you recall why that change was made? I'm sure it was purposeful, but it seems to cause a problem.

Next, when running npm run coveralls locally, this same callCount never increments, the callback never fires, and the callback contains the test.done() call, so the tests never move on. This is probably a different problem.

@dtex
Copy link
Collaborator

dtex commented Feb 19, 2023

Regarding the first issue, the first firing of i2cReadOnce comes from sip. The others are coming from the proximity.js SRF-10 read callback (line 100).

@scottgonzalez
Copy link
Contributor

I made the change because the test was failing and the check for exactly 1 would mean that the failure of too many calls would keep the interval around. The change causes the test to properly fail on the call count assertion a few lines later rather than leaving the interval running forever.

@dtex
Copy link
Collaborator

dtex commented Feb 19, 2023

That totally makes sense, and thanks for the quick reply. I'll see if I can figure out a good way to distinguish calls to i2cReadOnce between sip and proximity.

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

3 participants