forked from mtusi2026/mtusi2026lab6
Собрать наблюдаемый стенд, чтобы причину деградации API и worker было видно по метрикам, логам и трассам.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""Run the public resilience test on Windows by executing the shell hook with Git Bash.
|
||||
|
||||
The public test launches the hook directly. That works on Linux. This runner does not
|
||||
change tests/resilience.py; it only prefixes the same script with bash.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / "tests"))
|
||||
import resilience # noqa: E402
|
||||
|
||||
BASH = r"C:\Program Files\Git\bin\bash.exe"
|
||||
_popen = resilience.subprocess.Popen
|
||||
|
||||
|
||||
def popen(args, **kwargs):
|
||||
if args and str(args[0]).endswith(".sh"):
|
||||
args = [BASH, str(args[0])]
|
||||
return _popen(args, **kwargs)
|
||||
|
||||
|
||||
resilience.subprocess.Popen = popen
|
||||
resilience.run(resilience.main)
|
||||
Reference in New Issue
Block a user