From 393968fb60f2e409426fa826d9ca6ea5c5c05009 Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Sat, 30 Dec 2023 11:11:30 -0800 Subject: [PATCH] Limit the test case count --- DevOps.Util.DotNet/Triage/TriageContextUtil.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DevOps.Util.DotNet/Triage/TriageContextUtil.cs b/DevOps.Util.DotNet/Triage/TriageContextUtil.cs index b2f7fb6..5d24f17 100644 --- a/DevOps.Util.DotNet/Triage/TriageContextUtil.cs +++ b/DevOps.Util.DotNet/Triage/TriageContextUtil.cs @@ -400,8 +400,16 @@ public async Task EnsureTestRunAsync(ModelBuildAttempt modelBuildA }; Context.ModelTestRuns.Add(modelTestRun); + const int maxTestCaseCount = 200; + int count = 0; foreach (var dotnetTestCaseResult in testRun.TestCaseResults) { + count++; + if (count >= maxTestCaseCount) + { + break; + } + var testCaseResult = dotnetTestCaseResult.TestCaseResult; var testResult = new ModelTestResult() {