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.
Feedbacks on integration tests
When I first started to work on integration tests, I didn't know there was the great
prqlc/prql-compiler/tests/integration/dbs/README.md
file that explains clearly how to run those tests.I first had an issue by running
cargo nextest run --all-targets -F "test-dbs,test-dbs-external
and got bitten by the "it doesn't handle multiple processes"
Fortunately I saw the message
in
nextest.toml
and managed to run them properlyI also had issues with just starting the
mssql
container but this is due to my M1 and I found this issue that was alreadylinked in the docker-compose (microsoft/mssql-docker#668 (comment))
Thank you for that!
Once MSSQL was up and running, I thought everything would work. I was wrong 😬
The first time I run the test I got a timeout on the MSSQL server
I also got once the error
I don't remember if I stopped a test during execution or whatever but I had to dig a bit in the code
that it's just a side effect of the MySQL test that copies the csv files into
xyz.my.csv
.And since they are git ignored, you don't see anything in a
git status
.Anyway easy fix:
So how do we fix the MSSQL timeout error?
It appears there is an issue with the TLS handshake on M1 (see prisma/tiberius#65)
I propose the switch to
rustls
since it doesn't require headers or runtime libraries.(it conflicts with
async_native_tls
and is in the default features henece the need to deactivethose: see prisma/tiberius#317)
And when I went with this approach the handshake was done! Great so it works finally!!!
OR NOT
Ahhhh right! By setting
default-features = false
, I forgot to addtds73
which is also enabled by defaultAnnnnnnd TADA!
Improvements
When you run a test and see
test queries::compile::math ... ok
you don't know which dialects have been tested
And with a little
dbg!()
macro you see thatMSSQL
is not tested by default!So you NEED to add
# mssql:test
on top of the file to run it. That's weird compared to the others...But then I looked at the code and saw that level is "UNSUPPORTED". So makes sense but again you need to know to know ;)
And the second point is just to improve/update a bit the documentation
So I would go with those changes in this PR if you're ok with it