Changeset: 86f6114a4dfa for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/86f6114a4dfa
Modified Files:
testing/Mtest.py.in
Branch: Dec2023
Log Message:
Add a test at the end of testing a directory for number of free bats.
This is to catch when e.g. freed bats aren't getting reused.
diffs (29 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1451,6 +1451,25 @@ def PerformDir(env, testdir, testlist, t
interrupted = True
finally:
if pSrvr is not None:
+ try:
+ dbh = pymonetdb.connect(username='monetdb',
+ password='monetdb',
+ hostname=HOST,
+ port=int(pSrvr.port),
+ database=TSTDB,
+ autocommit=True)
+ except KeyboardInterrupt:
+ interrupted = True
+ except:
+ pass
+ else:
+ crs = dbh.cursor()
+ crs.execute("select count(*), max(id) from sys.bbp()")
+ nbats, maxid = crs.fetchall()[0]
+ crs.close()
+ dbh.close()
+ if maxid > nbats and maxid - nbats > 10000:
+ pSrvr.outfile.write(f'Too many free bats. Max ID =
{maxid}, # used = {nbats}, diff = {maxid - nbats}.')
pSrvr.terminate()
pSrvr = None
if produce_html:
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]