Skip to content

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Sep 9, 2025

Related to #50610. The PR addresses the concern, but keeping the issue open to add tests.

Comment on lines -46 to -49
if (TestOptions.HasFilterMode && !ModulePathExists())
{
return ExitCode.GenericFailure;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: What we used to do here is that we early return GenericFailure, with explanation only available when logging is enabled. Now, the implementation will simply attempt to start the process, which will throw exception if something is wrong with the path. The exception will bubble up to TestApplicationActionQueue and will be handled correctly there (we print the message + log it + ensure GenericFailure exit code + continue the rest test apps normally)

// TODO: If _handshakeInfo is null, we should error.
// We shouldn't be getting any session event messages without a previous handshake.

if (sessionEvent.SessionType == SessionEventTypes.TestSessionStart)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we receive multiple session start events for a single session uid?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I don't know. @mariam-abdulla ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, MTP should be sending only 1 TestSessionStart and 1 TestSessionEnd.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariam-abdulla I think that's generally correct yes. Maybe with HotReload being an exception? but I have no idea what the current status of HotReload with dotnet test is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep it as-is for now and follow-up later if needed. The PR already improves what we had before where we didn't do any validations of the test session events.

@Youssef1313 Youssef1313 merged commit 7dafa79 into dotnet:release/10.0.1xx Sep 10, 2025
27 checks passed
@Youssef1313 Youssef1313 deleted the dev/ygerges/dotnet-test-cont branch September 10, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants