ci: ensure all tests are performed #2423
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While working on another PR, I noticed a problem with tests that have been occurring for a long time.
Tests are started using
urun
, but when analyzing the logs, there are some inconsistencies:1.
It counts the total files, but change the step while still running the previous test:
2.
Some time counters don't respect a specific rule:
3.
The total of current valid tests are not
132
, but133
(18 for unit and 115 for integration).4.
Some tests aren't performed, giving the false impression that all the tests have passed.
The missing tests are random. For example, sometimes
test-packet-parser.js
is missing, other times it is there.5.
In contrast, the counter works fine locally, but when running tests locally, the missing test range is more variable:
6.
When running tests on GitHub Actions:
7.
In the case of
unhandledRejection
oruncaughtException
, the logs are displayed, but the process exit is0
.This PR
unhandledRejection
anduncaughtException
are finished with process1
.FILTER
in effect.FILTER
on testsbuiltin-runner
tests, as they already have their own test.Example
I kept the logs to be as similar as possible from
urun
:Directory: test/unit ✅ [ 0 00:00:00 1/18 6% node test/unit/commands/test-query.js ] ✅ [ 0 00:00:00 2/18 11% node test/unit/commands/test-quit.js ] ✅ [ 0 00:00:00 3/18 17% node test/unit/connection/test-connection_config.js ] # ...
Directory: test/integration test connect timeout ok ✅ [ 0 00:00:02 1/115 1% node test/integration/config/test-connect-timeout.js ] ✅ [ 0 00:00:03 2/115 2% node test/integration/config/test-typecast-global-option.js ] ✅ [ 0 00:00:03 3/115 3% node test/integration/connection/encoding/test-charset-results.js ]
Error example:
Naturally:
About to exit with code: 1
.Notes