Uh oh!
There was an error while loading. Please reload this page.
Use is not null instead of != null in new files from PR #10353 - #10362
Conversation
Fixes#10361 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed3dfd9e-f272-4b5a-b0fe-243680d50305
There was a problem hiding this comment.
Pull request overview
Aligns null checks with the Platform codebase’s established is not null convention. No behavioral changes.
Changes:
- Replaces nine
!= nullchecks with pattern matching. - Preserves existing serialization and MSBuild behavior.
Show a summary per file
| File | Description |
|---|---|
MSBuildConsumer.cs | Updates four lifecycle callback null checks. |
SerializerUtilities.TestNodeSerializers.cs | Updates five exception null checks. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
There was a problem hiding this comment.
Expert Review — PR #10362
Verdict: No issues found.
This is a straightforward, mechanical style fix replacing != null with is not null in two files introduced by PR #10353, aligning them with the repo convention enforced by .editorconfig and the coding guidelines.
All 8 replacements are correct pattern-matching substitutions with identical semantics (no custom operator != overloads are involved — these are reference-type/nullable checks). No behavioral change, no public API surface change, no new dependencies.
Nothing to flag across any review dimension — clean change. ✅
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Two more consumers whose state machines my change disturbed, both the same shape as the hang-dump fix: a retry sequence has one in-progress update for the whole test but a terminal update per attempt, so completing on a superseded attempt drops the test while its next attempt is still running. - `SimplifiedConsoleOutputDeviceBase` completed `_activeTestTracker` before the superseded gate, so active-test progress stopped after attempt 1. The comment there also asserted the opposite of what actually happens - "each attempt has its own in-progress/terminal pair" - which is wrong: MSTest reports in-progress once per test, outside the retry loop. Corrected both. - `SlowTestReporterBase` removed the uid from `_inProgress` on every terminal update, so a retried test stopped producing slow-test diagnostics after its first attempt. This is a shared base, so the Azure DevOps and GitHub slow-test reporters inherited the behavior. Also merges main (#10362). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fa37ea7e-23a2-458b-bb8a-68ad56c832e6
Fixes#10361
Replaces
!= nullwithis not nullin the two files introduced by #10353, aligning them with the repo convention used everywhere else in the Platform codebase.src/Platform/Microsoft.Testing.Extensions.MSBuild/MSBuildConsumer.cs— 4 occurrences (ApplicationStateGuard.Ensure(...))src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/SerializerUtilities.TestNodeSerializers.cs— 5 occurrencesStyle-only change; no behavior difference. Verified both projects build with 0 warnings / 0 errors.