anse1 / sqlsmith

A random SQL query generator
GNU General Public License v3.0
754 stars 128 forks source link

Continuously run #20

Closed rodo closed 6 years ago

rodo commented 6 years ago

Hi, Testing sqmlsmith over a postgresql database, the script seem to run continuously and never stop. Maybe it's the default behaviour, but as we think about inlcude it in our CI is it a solution to just run outsite of an infinite loop ?

anse1 commented 6 years ago

Rodolphe Quiédeville writes:

Testing sqmlsmith over a postgresql database, the script seem to run continuously and never stop. Maybe it's the default behaviour, but as we think about inlcude it in our CI is it a solution to just run outsite of an infinite loop ?

Right, running endlessly is the default. You can use the option --max-queries to exit after a certain number of generated queries. The --seed option might also be relevant in a CI use case. Default seed is the PID which is likely to be the same in a CI run. If the queries should be different in each CI run, I'd suggest a command line like the following:

./sqlsmith --verbose --max-queries=100 --seed=$(date +%s)

regards, Andreas

rodo commented 6 years ago

Thanks