test: harden database qualification startup and cleanup evidence
MariaDB persistence qualification / mariadb (push) Failing after 7s

This commit is contained in:
cesnimda
2026-10-24 14:04:57 +02:00
parent 2b26953d6f
commit 5ac11549b2
16 changed files with 228 additions and 15 deletions
@@ -150,7 +150,10 @@ def main():
record = {'lane': lane, 'startedUtc': utc(), 'generatedSchema': schema, 'commands': [], 'exitCode': 1, 'cleanup': {'attempted': False}}
started = time.monotonic()
def execute(command, name):
nonlocal created
completed = subprocess.run(['rtk', 'proxy', *command], cwd=ROOT, env=env, capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=30)
# Cleanup ownership must survive a diagnostic write failing after successful CREATE.
if name == 'create-schema' and completed.returncode == 0: created = True
log = OUT / (lane + '-' + name + '.log')
log.write_text(scrub(completed.stdout + completed.stderr), encoding='utf-8')
record['commands'].append({'operation': name, 'exitCode': completed.returncode, 'log': str(log.relative_to(ROOT))})
@@ -172,7 +175,6 @@ def main():
record['serverVersion'] = version
if not re.fullmatch(r'12\.2\.2-MariaDB(?:-[A-Za-z0-9.]+)?', version): raise ValueError('Unexpected actual server version')
sql(schema_sql(schema), 'create-schema')
created = True
env['JOBTRACKER_MARIADB_BROWSER_CONNECTION'] = f'Server=127.0.0.1;Port=33308;Database={schema};User ID=root;Password=jt-integration-only;SslMode=None'
command = ['node', 'node_modules/@playwright/test/cli.js', 'test', '--config=' + config, '--retries=0', '--reporter=list,json', '--output=' + str(results_path)]
record['command'] = command