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

Attempt to fix broken CI tests #2841

Merged
merged 6 commits into from
Jul 1, 2021
Merged

Conversation

relu91
Copy link
Collaborator

@relu91 relu91 commented Jun 11, 2021

Hi, while working on #2811 a stumble upon a random timeout in the test. As described in #2837 I think the problem is when the virtual-adapter plug-in is installed. This PR fixes #2837 by blocking further adapter additions when the plug-in already got an unload request. Furthermore, it now fails gracefully when unload is called more than once.

Finally, I also "improved" the log tests. Basically, in my system, it failed when you already executed the tests (like one day before), because it had a wrong log file count. Now it clears the log folder to have a clean state. Let's hope that now we have a green light 🤞🏻

Fix 2837. Now adapters cannot be added after unload is called
@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2021

Codecov Report

Merging #2841 (cbecf9c) into master (772e98b) will decrease coverage by 1.27%.
The diff coverage is 34.74%.

❗ Current head cbecf9c differs from pull request most recent head 6d37915. Consider uploading reports for the commit 6d37915 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2841      +/-   ##
==========================================
- Coverage   66.52%   65.25%   -1.28%     
==========================================
  Files         121      124       +3     
  Lines        7615     7952     +337     
  Branches     1289     1316      +27     
==========================================
+ Hits         5066     5189     +123     
- Misses       2506     2721     +215     
+ Partials       43       42       -1     
Impacted Files Coverage Δ
src/plugin/adapter-proxy.ts 77.63% <0.00%> (ø)
src/models/group.ts 14.70% <14.70%> (ø)
src/db.ts 68.96% <22.22%> (-8.74%) ⬇️
src/models/groups.ts 26.92% <26.92%> (ø)
src/controllers/groups_controller.ts 27.73% <27.73%> (ø)
src/models/things.ts 76.68% <52.63%> (-5.27%) ⬇️
src/models/thing.ts 69.08% <70.00%> (+0.30%) ⬆️
src/controllers/things_controller.ts 80.31% <83.33%> (-0.08%) ⬇️
src/addon-manager.ts 60.13% <100.00%> (ø)
src/constants.ts 100.00% <100.00%> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 772e98b...6d37915. Read the comment docs.

@benfrancis benfrancis merged commit ac03f50 into WebThingsIO:master Jul 1, 2021
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

Successfully merging this pull request may close these issues.

Plugin allows adding adapters after unloadComponents
3 participants