Create new database clusuters on every test run#689
Conversation
The cost of running initdb, especially without fsync, is not very big on modern computers and version of PostgreSQL so the optimization of reusing the same database cluster between test runs is just a potential footgun no longer worth the benefits. It might still be worth caching the generated TLS certificates but for now let's not do that to keep the code simple.
|
Thank you again! I merged this except the last commit. The May I ask you about the reason doing all the effort on ruby-pg? |
|
Thanks for merging! But sadly As for why my interest? I wrote you an email earlier today (so no wonder you have not seen it yet) but I can tell you here too. I am planning to propose adding support for Oauth to the These improvements to the test suite were just things I ran into when I was working on adding test cases for my patch, plus some things I spotted when reading the code. :) |
30fa477 to
c2377da
Compare
|
OK, |
|
Exactly! Proper test coverage is the trickiest part of the patch. I have not yet made up my mind for how to do it, but it was while exploring ideas I felt I should clean up the test helpers a bit. |
To make tests a little bit faster, as proposed in #689. And fix indention by the way.
The cost of running
initdb, especially without fsync, is not very big on modern computers and version of PostgreSQL so the optimization of reusing the same database cluster between test runs is just a potential footgun no longer worth the benefits.It might still be worth caching the generated TLS certificates but for now let's not do that to keep the code simple.
On top of this I decided to clean up the
PostgresServerclass in general. I have ideas for how to further clean up the test suite but this was the main things which made the test suite annoying to run for me locally.