ChatGPT's update to harden software and run db updates.

This commit is contained in:
2026-10-21 06:53:45 -04:00
parent 1e63076123
commit acc8cb70f5
171 changed files with 9325 additions and 404 deletions
+20
View File
@@ -0,0 +1,20 @@
import os,subprocess,time
from application_harness import Application,PHP,ROOT
app=Application()
workers=[]
try:
ids=app.fixture('tenantSeed');env=app.env.copy();env['HCR_CLUB_EXPORT_HOURLY']='5';start=str(time.time()+2)
for n in range(12):
workers.append(subprocess.Popen(PHP+['tests/resource_worker.php',str(ids['admina' if n%2 else 'admina2']),str(ids['clubA']),start],cwd=ROOT,env=env,stdout=subprocess.PIPE,stderr=subprocess.PIPE,text=True))
outputs=[]
for worker in workers:
out,err=worker.communicate(timeout=20)
if worker.returncode:raise RuntimeError(err+out)
outputs.append(out)
assert outputs.count('allowed')==5 and outputs.count('limited')==7,outputs
print('PASS: Twelve simultaneous requests from two administrators share exactly five export slots')
print('1 resource concurrency scenario passed.')
finally:
for worker in workers:
if worker.poll() is None:worker.kill();worker.wait()
app.close()