@@ -89,7 +89,9 @@ def run_tests() -> Dict[str, Any]:
8989 test_bin = BASE_DIR / "Philips.CodeAnalysis.Test" / "bin" / "Release"
9090 if test_bin .exists ():
9191 cmd .append ("--no-build" )
92- timeout = 600 if did_restore_now else 180
92+ # Tests take ~48 seconds to run 1903 tests. Use 240 seconds (4 minutes) to ensure completion.
93+ # If restore was just done, allow 600 seconds (10 minutes) total.
94+ timeout = 600 if did_restore_now else 240
9395 rc , out = _run (cmd , timeout = timeout )
9496
9597 test_results = {"passed" :0 ,"failed" :0 ,"skipped" :0 ,"total" :0 ,"duration" :"" }
@@ -230,13 +232,14 @@ def analyze_coverage() -> Dict[str, Any]:
230232 _run (["dotnet" , "tool" , "install" , "--global" , "dotnet-coverage" , "--version" , "17.9.6" ], timeout = 300 )
231233
232234 coverage_bin = _coverage_exe ()
235+ # Coverage collection with test execution takes longer than regular tests (~60-90 seconds)
233236 rc , out = _run ([
234237 coverage_bin , "collect" ,
235238 "dotnet" , "test" , "Philips.CodeAnalysis.Test/Philips.CodeAnalysis.Test.csproj" ,
236239 "--configuration" , "Release" , "--no-build" ,
237240 "--logger" , "trx;LogFileName=coverage-test-results.trx" ,
238241 "--output-format" , "xml" , "--output" , "coverage.xml"
239- ])
242+ ], timeout = 300 )
240243
241244 analysis = {"status" : "success" if rc == 0 else "failure" , "overall_coverage" : 0.0 , "uncovered_lines" : [], "suggestions" : []}
242245 xml_path = BASE_DIR / "coverage.xml"
0 commit comments