diff test/test_redis_session.py @ 7880:a4923cec0afa

test: close otks/session databases before replacing with redis db Same fix as patch to close sqlite session db's when using anydbm session databases. Not sure if this left open files in the working database directory but...
author John Rouillard <rouilj@ieee.org>
date Thu, 18 Apr 2024 18:57:49 -0400
parents 1b7162938988
children
line wrap: on
line diff
--- a/test/test_redis_session.py	Thu Apr 18 17:39:56 2024 -0400
+++ b/test/test_redis_session.py	Thu Apr 18 18:57:49 2024 -0400
@@ -57,6 +57,10 @@
             pw = ""
 
         # redefine the session db's as redis.
+        # close the existing session databases before opening new ones.
+        self.db.Session.close()
+        self.db.Otk.close()
+
         self.db.config.SESSIONDB_BACKEND = "redis"
         self.db.config.SESSIONDB_REDIS_URL = \
                     'redis://%slocalhost:6379/15?health_check_interval=2' % pw

Roundup Issue Tracker: http://roundup-tracker.org/