File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -801,13 +801,15 @@ def free_port(self):
801801 self ._should_free_port = False
802802 release_port (self .port )
803803
804- def cleanup (self , max_attempts = 3 ):
804+ def cleanup (self , max_attempts = 3 , full_clean = testgres_config . node_cleanup_full ):
805805 """
806806 Stop node if needed and remove its data/logs directory.
807807 NOTE: take a look at TestgresConfig.node_cleanup_full.
808808
809809 Args:
810810 max_attempts: how many times should we try to stop()?
811+ full_clean: True - clean all node data
812+ False - clean only data dir, save logs
811813
812814 Returns:
813815 This instance of :class:`.PostgresNode`.
@@ -816,7 +818,7 @@ def cleanup(self, max_attempts=3):
816818 self ._try_shutdown (max_attempts )
817819
818820 # choose directory to be removed
819- if testgres_config . node_cleanup_full :
821+ if full_clean :
820822 rm_dir = self .base_dir # everything
821823 else :
822824 rm_dir = self .data_dir # just data, save logs
You can’t perform that action at this time.
0 commit comments