Make sure the INSERT completes before trying the SELECT
Merge pull request #132 from tomhughes/tests

Make sure the INSERT completes before trying the SELECT