-
Notifications
You must be signed in to change notification settings - Fork 736
support logging in CommandRunner when tests are executed in parallel #3732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| bool waitForExit, | ||
| int timeOutInMilliseconds = 60000, | ||
| Action<StreamWriter> inputAction = null, | ||
| bool shareProcessObject = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found no callers in the entire codebase who is passing this optional parameter. Hence removed it. If there are any concerns from others, I can add it back.
| Process p = null; | ||
|
|
||
| try | ||
| using (p = new Process()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you shortly elaborate in more detail how your change helps?
I know you linked the issues and I appreciate that, but I was hoping you could save us some time digging through the linked docs if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated PR description with additional information. Pls let me know your feedback.
nkolev92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the link.
Great find!
Consider adding a note on what not just the why in the PR title.
|
🔔 @NuGet/nuget-client. Any feedback on this PR is helpful. Waiting for second approval. |
zivkan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great find!
Bug
Fixes: NuGet/Client.Engineering#613
Regression: No
Fix
Details: When we run
NuGet.CommandLine.Tests, every test in the test suite execute creates anuget.exeprocess as shown below. Everynuget.exeprocess executing test command publishesoutput and error streamto the parent process so that test can check the result to verify the test status.The way we read output and error stream from a Process while running tests in
CommandRunner.Runmethod doesn't work well when tests are executed in parallel because of following reasons.outputorerrorstring builder here the results were inconsistent.Work is in progress to support running test suites in parallel. see this issue for more info. This change is required to execute tests in parallel.
I found this doc and issue extremely helpful while working on this fix.
Testing/Validation
Tests Added: No
Reason for not adding tests: Fixing test utility method.
Validation: