Skip to content

Commit f5763df

Browse files
Copilotericstj
andauthored
Fix regex timeout test by reducing timeout from 10ms to 1ms (#117617)
* Initial plan * Fix regex timeout test by reducing timeout from 10ms to 1ms Co-authored-by: ericstj <8918108+ericstj@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ericstj <8918108+ericstj@users.noreply.github.com>
1 parent b81c923 commit f5763df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Match.Tests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ private async Task Match_TestThatTimeoutHappens(RegexEngine engine)
12381238
}
12391239
string input = new string(chars);
12401240

1241-
Regex re = await RegexHelpers.GetRegexAsync(engine, @"a.{20}^", RegexOptions.None, TimeSpan.FromMilliseconds(10));
1241+
Regex re = await RegexHelpers.GetRegexAsync(engine, @"a.{20}^", RegexOptions.None, TimeSpan.FromMilliseconds(1));
12421242
Assert.Throws<RegexMatchTimeoutException>(() => { re.Match(input); });
12431243
}
12441244

0 commit comments

Comments
 (0)