rumble icon indicating copy to clipboard operation
rumble copied to clipboard

Automized Server tests

Open CanBerker opened this issue 5 years ago • 7 comments

Firstly, I have moved spotless checks before all other tests so formatting issues can be detected first without wait.

Secondly, I have implemented a bash script with automized server tests. This works on my local machine. ~However, since the workflow does not install spark-submit to the test machine. The server initialization fails.~ I wanted to get @ghislainfourny's feedback on how to proceed.

Edit: I have updated the script to install Spark during testing

Fixes #664

CanBerker avatar May 13 '20 15:05 CanBerker

This is wonderful, thank you!

Could we please add a test that checks for a multiline query in the request body? There was a bug we had to fix to make it work with the Rumble magic in Jupyter notebooks.

After this, we could merge. This is a perfect bootstrap of server tests.

I think installing Spark in this way is good and I am happy with this. I guess the maven test command might create a jar where it is included or something, which explains why it is not needed there.

ghislainfourny avatar May 15 '20 11:05 ghislainfourny

We'll have to keep in mind to bump the version here as well (the minor update to 1.6.1 broke the tests but should be an easy fix).

ghislainfourny avatar May 15 '20 11:05 ghislainfourny

Could we please add a test that checks for a multiline query in the request body? There was a bug we had to fix to make it work with the Rumble magic in Jupyter notebooks.

If you could share the test that failed earlier I could add it as our test. Otherwise I'm assuming any test containing a new line character "\n" in the request should do. Is this correct?

This works: curl --silent --show-error --stderr - --data 'let $x := parallelize(1 to 10)[2] return $x' -X GET "http://localhost:8000/jsoniq"

The parser fails with the newline character added: curl --silent --show-error --stderr - --data 'let $x := parallelize(1 to 10)[2] \n return $x' -X GET "http://localhost:8000/jsoniq"

CanBerker avatar May 15 '20 14:05 CanBerker

We'll have to keep in mind to bump the version here as well (the minor update to 1.6.1 broke the tests but should be an easy fix).

The version changes should not be a problem anymore with my recent commits.

CanBerker avatar May 15 '20 15:05 CanBerker

@ghislainfourny the newline added with "\n" breaks the query for some reason. Could you provide any insights or could you share the query that you intended to run?

CanBerker avatar May 25 '20 08:05 CanBerker