Well, that’s pretty much it, thanks for stopping by ; )
In all seriousness, it’s kind of neat that we’re using dbqp to run some of our staging tests and we gain a few neat things:
Speed
Here are the trend charts for randgen and crashme. While it doesn’t look like randgen is showing much of an improvement, it is worth mentioning that this job now runs both the standard and the transaction log tests in a single run >: ) Previously, we had a separate drizzle-automation job for the transaction log. Just the trx_log tests took ~30 minutes to run (plus build time). Long story short, we’re saving about 30-40 minutes on randgen testing per staging run and only needing to build once!
Maintainability
The jobs we run are in the tree and anyone can easily repeat them. While Drizzle-automation kicks major butt (and I have taken many ideas from it), it is a separate piece of software that requires setup and maintenance. Basing things around an in-tree setup means that you only need the code and any required bits and pieces. Now if we need to set up a new randgen machine, we only need the randgen and dbd::drizzle installed (and we plan on including randgen in-tree soon, so you won’t even need that!). If we need to set up a new crash-me machine, we only need dbd::drizzle – and everyone should have dbd::drizzle installed! ; )
Ease of use
Pretty much all tests provide the same standard output:
dtr mode
From the command:
./dbqp
Our default mode is dtr (aka using drizzletest.cc to execute standard .test files). To run all available tests, use the make target – make test-dbqp
20110621-081404 trigger_dictionary.loaded [ pass ] 43
20110621-081408 logging_stats.cumulative [ pass ] 1045
20110621-081412 errmsg_stderr.stderr [ pass ] 36
20110621-081412 ===============================================================
20110621-081412 INFO Test execution complete in 496 seconds
20110621-081412 INFO Summary report:
20110621-081412 INFO Executed 566/566 test cases, 100.00 percent
20110621-081412 INFO STATUS: PASS, 566/566 test cases, 100.00 percent executed
20110621-081412 INFO Spent 254 / 496 seconds on: TEST(s)
20110621-081412 INFO Test execution complete
20110621-081412 INFO Stopping all running servers...
randgen mode
From the command:
./dbqp --mode=randgen --randgen-path=/path/to/your/randgen
20110621-170141 main.subquery [ pass ] 3780
20110621-170148 main.subquery_semijoin [ pass ] 3016
20110621-170156 main.subquery_semijoin_nested [ pass ] 3750
20110621-170202 main.varchar [ pass ] 2658
20110621-170202 ===============================================================
20110621-170202 INFO Test execution complete in 147 seconds
20110621-170202 INFO Summary report:
20110621-170202 INFO Executed 19/19 test cases, 100.00 percent
20110621-170202 INFO STATUS: PASS, 19/19 test cases, 100.00 percent executed
20110621-170202 INFO Spent 77 / 147 seconds on: TEST(s)
20110621-170202 INFO Test execution complete
20110621-170202 INFO Stopping all running servers...
crashme mode
From the command:
./dbqp --mode=crashme
20110621-181515 main.crashme [ fail ] 149840
20110621-181515 func_extra_to_days=error # Function TO_DAYS
20110621-181515 ###
20110621-181515 ###<select to_days('1996-01-01') from crash_me_d
20110621-181515 ###>2450084
20110621-181515 ###We expected '729024' but got '2450084'
20110621-181515 func_odbc_timestampadd=error # Function TIMESTAMPADD
20110621-181515 ###
20110621-181515 ###<select timestampadd(SQL_TSI_SECOND,1,'1997-01-01 00:00:00')
20110621-181515 ###>1997-01-01 00:00:01.000000
20110621-181515 ###We expected '1997-01-01 00:00:01' but got '1997-01-01 00:00:01.000000'
20110621-181515 ###
20110621-181515 ###<select {fn timestampadd(SQL_TSI_SECOND,1,{ts '1997-01-01 00:00:00'}) }
20110621-181515 ###>1997-01-01 00:00:01.000000
20110621-181515 ###We expected '1997-01-01 00:00:01' but got '1997-01-01 00:00:01.000000'
20110621-181515
20110621-181515 ERROR Failed test. Use --force to execute beyond the first test failure
20110621-181515 ===============================================================
20110621-181515 INFO Test execution complete in 153 seconds
20110621-181515 INFO Summary report:
20110621-181515 INFO Executed 1/1 test cases, 100.00 percent
20110621-181515 INFO STATUS: FAIL, 1/1 test cases, 100.00 percent executed
20110621-181515 INFO FAIL tests: main.crashme
20110621-181515 INFO Spent 149 / 153 seconds on: TEST(s)
20110621-181515 INFO Test execution complete
20110621-181515 INFO Stopping all running servers...
While this isn’t a huge feature, it is nice to have a standardized report for knowing if something failed, what failed and how (we always dump test tool output on test failures). Why is this nice? Well, the world is a busy place and only needing to know one way of reading test output simplifies things just a teensy little bit. This small improvement becomes a huge benefit over time if you happen to spend good chunks of your day looking at test output like me : )
Other than that, I’m still working on teaching dbqp interesting new tricks that will help me in testing SkySQL‘s Reference Architecture – expect to hear more about that next month!