Start migration of stateless use cases to logic test #5838
Replies: 3 comments 2 replies
-
cc @ZeaLoVe It will be very useful if we can generate a full test file with a prototype test file. For example, we can write an original prototype test file as:
And then we can run the test and fill the result back to test file as:
This will generate a full test file:
Sometimes, developers may need to modify some test file, this mechanism will be very helpful. |
Beta Was this translation helpful? Give feedback.
-
I found it looks unclear if we specify a complicated error pattern, for example:
Maybe we should allow user to quote the pattern, or write some delimiters(e.g. cc @ZeaLoVe |
Beta Was this translation helpful? Give feedback.
-
In following days, I will start to delete test in stateless dir, and make sure the logic test completely take place of this cases. track tasks
|
Beta Was this translation helpful? Give feedback.
-
Background
RFC ref:#5048
Code:https://github.com/datafuselabs/databend/tree/main/tests/logictest
The original stateless test cannot clearly reflect the expectation of each sql execution in the use case, mainly testing the mysql protocol, not covering different protocols such as http and subsequent clickhouse. the goal of the logic test is to ensure that the sql execution result meets the expectation and performs consistently under different handlers.
Logic Test Usage
A demo ref https://github.com/datafuselabs/databend/blob/main/tests/logictest/suites/select_0 and RFC documentation
Three main use case types are supported
Attention
Use Case Generator
Basic concept
Generated in the following way.
Usage:
Go to the logic test directory
Execute : python3 gen_suites.py .*00_0000.* (The parameter is a regular expression to filter the test file, the default is . *, means all)
Imgration Plan
Beta Was this translation helpful? Give feedback.
All reactions