will / crystal-pg

a postgres driver for crystal
BSD 3-Clause "New" or "Revised" License
462 stars 77 forks source link

Reuse existing connection for shared specs #256

Closed will closed 1 year ago

will commented 1 year ago

I noticed that the shared specs were making a new connection for every example, which wasn't necessary. Reusing the connection makes the tests to run on my laptop with compile time from an average of 12.275 seconds to 7.877

Nothing is failing now and I think the monkey patch is easy enough to back out should it start causing problems. But maybe there should be an official way to reuse an existing connection for the shared specs?