postgrespro/testgres

Directory cached_data_dir did not cleanup after test finished

sfalkon opened this issue · 5 comments

Directory cached_data_dir did not cleanup after test finished

Hi @sfalkon, good catch!

@ildus, @zilder, I think we should remove cached_data_dir automatically, but it's hard to tell who should be responsible for this action. We could probably add a refcounter and do +1 in __enter__() and -1 in __exit__() of PostgresNode, but that would nullify all the benefits of such cache if only one instance of PostgresNode is active at any time.

ildus commented

@funbringer yeah, we can't remove it on __exit__. First of all we will need it for the next node, and secondly user can start nodes without with blocks. I think we should use atexit handlers.

Maybe, should user call "clean()" function manually?

Fixed in 1.3.2.