comparison 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
comparison
equal deleted inserted replaced
7879:39c482e6a246 7880:a4923cec0afa
55 pw = ":%s@" % pw 55 pw = ":%s@" % pw
56 else: 56 else:
57 pw = "" 57 pw = ""
58 58
59 # redefine the session db's as redis. 59 # redefine the session db's as redis.
60 # close the existing session databases before opening new ones.
61 self.db.Session.close()
62 self.db.Otk.close()
63
60 self.db.config.SESSIONDB_BACKEND = "redis" 64 self.db.config.SESSIONDB_BACKEND = "redis"
61 self.db.config.SESSIONDB_REDIS_URL = \ 65 self.db.config.SESSIONDB_REDIS_URL = \
62 'redis://%slocalhost:6379/15?health_check_interval=2' % pw 66 'redis://%slocalhost:6379/15?health_check_interval=2' % pw
63 self.db.Session = None 67 self.db.Session = None
64 self.db.Otk = None 68 self.db.Otk = None

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