[release/9.0] Update dependencies from dotnet/arcade#12
Conversation
…127.5 On relative base path root Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor From Version 9.0.0-beta.25562.4 -> To Version 9.0.0-beta.25577.5
…otnet#64326) (cherry picked from commit c4f8522)
…meUser (dotnet#59992) (cherry picked from commit 2f9d787)
…sLiteral test Port of same change from 8.0 in dotnet#63565
…211.4 On relative base path root Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor From Version 9.0.0-beta.25562.4 -> To Version 9.0.0-beta.25611.4
…226.6 On relative base path root Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor From Version 9.0.0-beta.25562.4 -> To Version 9.0.0-beta.25626.6
| ParseErrorMessageRegexOld.IsMatch(logs[0].Message) && | ||
| ParseErrorMessageRegexNew.IsMatch(logs[0].Message), |
There was a problem hiding this comment.
🔴 Incorrect logical operator in regex assertion - uses AND instead of OR
The assertion logic uses && (AND) when it should use || (OR) to match the error message.
Click to expand
Problem
The code at lines 107-110 asserts:
Assert.True(
ParseErrorMessageRegexOld.IsMatch(logs[0].Message) &&
ParseErrorMessageRegexNew.IsMatch(logs[0].Message),
$"Expected log message to match one of the CSP error patterns: {ParseErrorMessageRegexOld} or {ParseErrorMessageRegexNew}. Actual: {logs[0].Message}");The error message says "match one of the CSP error patterns" but the code requires both patterns to match (&&). This is logically incorrect because:
ParseErrorMessageRegexOldmatches:"Refused to frame...because an ancestor violates..."ParseErrorMessageRegexNewmatches:"Framing...violates..."
These are two different error message formats - a browser will produce one OR the other, never both simultaneously in the same message.
Impact
The test will always fail because a single log message cannot match both regex patterns at the same time. The test should pass if either pattern matches.
Expected behavior
The assertion should use || (OR):
Assert.True(
ParseErrorMessageRegexOld.IsMatch(logs[0].Message) ||
ParseErrorMessageRegexNew.IsMatch(logs[0].Message),
...);Recommendation: Change && to || on line 108 so the assertion passes when either regex pattern matches the log message.
Was this helpful? React with 👍 or 👎 to provide feedback.
Benchmark PR from qodo-benchmark#80