Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<PackageVersion Include="MessagePack" Version="3.1.8" />
<PackageVersion Include="StrongNamer" Version="0.2.5" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.Management" Version="9.0.4" />
<PackageVersion Include="System.Management" Version="10.0.12" />
<PackageVersion Include="xunit.v3.mtp-v2" Version="4.0.0" />
</ItemGroup>
<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace Microsoft.Testing.Platform.Acceptance.IntegrationTests;

[TestClass]
[DoNotParallelize]
public class TrxTests : AcceptanceTestBase<TrxTests.TestAssetFixture>
{
[DynamicData(nameof(TargetFrameworks.AllForDynamicData), typeof(TargetFrameworks))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,21 @@ public async Task ServerDisposal_WhenClientConnectsWithoutSendingRequest_DoesNot
await Task.Run(server.Dispose, TestContext.CancellationToken).TimeoutAfterAsync(DisposalTestTimeout);
Comment thread
Evangelink marked this conversation as resolved.

byte[] responseBuffer = new byte[1];
int bytesRead = await client.ReadAsync(responseBuffer, 0, responseBuffer.Length, TestContext.CancellationToken);
Assert.AreEqual(0, bytesRead);
try
{
Task<int> readTask = client.ReadAsync(responseBuffer, 0, responseBuffer.Length, TestContext.CancellationToken);
Task completedTask = await Task.WhenAny(readTask, Task.Delay(DisposalTestTimeout, TestContext.CancellationToken));
Assert.AreSame(readTask, completedTask, "The client remained connected after server disposal.");
int bytesRead = await readTask;
Assert.AreEqual(0, bytesRead);
}
catch (IOException ex) when (ex.InnerException is System.Net.Sockets.SocketException
{
SocketErrorCode: System.Net.Sockets.SocketError.ConnectionReset,
})
{
// Unix can report a forced close of an idle pipe as a connection reset instead of EOF.
}
}

[TestMethod]
Expand Down