-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add test for MSBuild Server #7592
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
Add test for MSBuild Server #7592
Conversation
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 think 3s it way too long. I would start with 1s, put comment there "if flaky on 'Server already running' enlarge this time".
The things is that we shall, strategically, try to have fast unit tests.
…into server-node-test
…into server-node-test
|
|
||
| Console.WriteLine("==== OUTPUT ===="); | ||
| Console.WriteLine(output); | ||
| Console.WriteLine("Process ID is " + pid + "\r\n"); |
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'm likely not understanding the test, but process IDs get reused, and the algorithm used is not stable, so if a server process exits the next one can potentially get the same id?
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.
The tests should check the logic of msbuild server. That is:
- If the special flag is on, we use msbuild server for task execution. Msbuild server process is a long living one. It lives the same time as the msbuild nodes (15 min).
- If server is occupied, there should be a fallback to the usual, non-server, build.
The task itself writes down the id of the process that is used for the build, and here we write down the process id of the msbuild process that was created for building a project. If msbuild server was used, these ids would be different (first one would be the id of msbuild server and the second one would be the id of msbuild client). If not used, they would be the same. Thus, we check how the build was executed, in or out the server.
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.
Ah, so long as the first process has not exited, then yes of course they have different PID's. Thanks. Otherwise of course you have to check process start time.
Progress on #7377
Context
Adds a test for MSBuild server. This covers
Changes Made
Added one test and modified RunnerUtilities.ExecMSBuild to support it.
Testing
Ran the test, and it passed. Observed intermediate stages to ensure they were as expected.
Notes
Other tests to add:
Verify legacy behavior
Verify proper mixed behavior (legacy build after MSBuild server started)
Check behavior when starting a new build while the previous build is still executing.