Conversation
- Continuous benchmarking (CI/CD) - Platform tests (CI/CD) - Linting/general CI/CD updates
|
There are test failures on windows and macos. Have a look into why that is the case using However I was thinking, let's just update |
Could there potentially be issues with an injected logger coming from PK that wants the formatting to be json? Because if this is passed through to EFS's DB then the logger there wouldn't have that functionality. Would it cause a runtime error or just be ignored? |
No the bugs on windows and Mac are separate issues. Have a look at the logs and try cloning and reproducing it on the 2 machines. |
|
So runtime wise, when you switch to JSON formatting this only occurs for the root logger so it won't affect the child loggers. |
|
Having a look at the failures on windows now. The mac failure on the cicd looks to be just a timeout, however, |
|
There are a LOT of failures on Windows, all of them in the |
|
Alot of concurrency tests may not be robust against timing and scheduling changes. Which is why I wanted to get the better concurrency fast-check utility. See what you can fix right now, and report new issues for these bugs for the ones that will take more time. |
Using `path.join` caused the tests to use the windows' separator for the path which is not supported by the EFS. This lead to a lot of test failures. #69
…oin` to disambiguate with `utils.pathJoin`
|
Failed timeout test on macos: Seems maybe the macos is just slow. Anyway the js-db v5 will be alot faster. For comparison: |
|
Funnily enough the test only tests 50 files. I'm going to try to see if 25 files will make it pass. Speed improvements will be important for js-db 5.0.0 to compare. |
|
Either the macos runner is crazy slow, or the db is just really slow for macos: So this will pass now. |
|
The next test failure is inconsistent concurrency test. In fact I think it is wrong. @tegefaulkes. Says at the end that it read operation will either read all 50 bytes, or it will read 0 bytes. Why is this so? It could read 5 bytes, 10 bytes, or any multiple in between. The atomicity is per write. It's not between the 2 operations. |
|
If that's the case then it might just be an oversight of the test. Although wouldn't a write stream 'flush' the writes in blocks? Just putting the error log here for reference. Details |
|
To fix this, I've integrated the https://github.com/jest-community/jest-extended library. This package brings in quite a few useful matchers, that we should integrate into PK as well, as it provides some standard matchers that we have been missing for quite a bit. In particular I'm interested in asymmetric matching and the 200c0f1 brings in jest-extended, @emmacasolin this can go into staging of PK. Subsequently for the test itself, I've changed it to be predicate based. This is one step towards "model based testing", where we create a model of the predicates, and then allow simulations to fit the predicates. So subsequently we can bring in The predicate simply now checks that the bytes read is always a multiple of 5 starting at 0. I've removed the second variant of delaying by 100ms, this should be done when |
|
There could be other tests that are non-deterministic too due to incorrect assumption on promise execution order. Those will need to be fixed with a combination of |
|
Pipeline Succeeded on 598964074 for ba683e0 |
This is an automatic PR generated by the pipeline CI/CD. This will be automatically fast-forward merged if successful.
Fixes #69