-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix StartInfo test #44392
Fix StartInfo test #44392
Conversation
Tagging subscribers to this area: @eiriktsarpalis, @jeffhandley |
src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Windows.cs
Outdated
Show resolved
Hide resolved
src/coreclr/src/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs
Outdated
Show resolved
Hide resolved
src/coreclr/src/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs
Outdated
Show resolved
Hide resolved
src/mono/netcore/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jan Kotas <[email protected]>
@dotnet/dnceng any thoughts here?
|
Taking a look. |
@danmosemsft this is because only the first 141 MB of the artifact was downloaded, when if it had finished it would have made it to 376-ish MB, and of course they declared victory. When you go to untar it, it rightfully says that isn't a valid file. I'll go find the issue about this, but I don't think they're likely to fix it any time soon. |
So it's an Azure DevOps issue, and I should just retry? |
definitely so, still finding it (lots of IMs right now) |
No update in 109 days, but it's microsoft/azure-pipelines-tasks#13250 if you'd like to push on it. |
@jkotas any other feedback? |
@@ -985,17 +981,15 @@ public void StartInfo_TextFile_ShellExecute() | |||
|
|||
try | |||
{ | |||
process.WaitForInputIdle(); // Give the file a chance to load | |||
Assert.Equal("notepad", process.ProcessName); | |||
|
|||
if (PlatformDetection.IsInAppContainer) |
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.
You can delete the whole IsInAppContainer
block while you are on it.
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.
LGTM otherwise
I notice that this existing test adds up to 30 seconds to the time these tests take to run |
I fixed that, but there's two processes both launched by I did fix one place where dispose wasn't called, but it isn't the cause of the problem. |
@akoeplinger Android timed out. |
Hello @danmosemsft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@jkotas can you sign off? |
@@ -639,13 +639,17 @@ public async Task WaitAsyncForSelfTerminatingChild() | |||
[ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] | |||
public async Task WaitAsyncForProcess() | |||
{ | |||
Process p = CreateSleepProcess(WaitInMS); | |||
Process p = CreateProcessPortable(RemotelyInvokable.SleepWithWrite, "1000"); | |||
p.StartInfo.RedirectStandardOutput = true; |
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 am not able to figure out what this is trying to fix and why it works. Could you please elaborate?
I believe that this fix is not quite right. If the stdout buffer is small or non-existing, the test will hang. The process will be stuck on writing to stdout. This write will never end because of ReadToEnd
that reads from other side of the pipe is done only after the process exits.
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.
As written, WaitAsyncForProcess takes at least 30 seconds to complete. That is because it waits on the first to finish of: a process that sleeps for 30 seconds, and a 60 second delay. The other tests are mostly finished by the time it starts, so it causes the test run to wait that long. (Although, having mitigated that, there is a subsequent 5 minute delay as mentioned above)
If this delay was intentional I guess it was to try to avoid the process exiting before waiting on it to exit. So, I was hoping to find a way to block the child process from exiting until WaitForExitAsync()
is called.
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 we make the test outer loop instead?
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.
Perhaps I can use an event such as in WaitForSignal().
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.
Sure, I'll do that for now.
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.
Done, and opened issue.
43269f1
to
7fba861
Compare
Installer failure is #43917 |
Libraries checked coreclr Linux run is failed installer. I will try one more time. |
@dotnet/dnceng is this known?
|
Yes, I will add you to a thread. |
Fix one of the tests in #44239
For the other, gather some small extra info -- but I have no theory why setting the apartment state is failing, if the version of Windows does support COM.