Skip to content
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 Net9.0 to WCF client test and suppress warnings due to the change. #5666

Merged
merged 1 commit into from
Nov 13, 2024
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
Add Net9.0 to wcf client test and supress warnings due to the change.
  • Loading branch information
imcarolwang committed Oct 22, 2024
commit cf1e8f001406ecaa3328d26a6abf3ab2c8ffe8be
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
</ItemGroup>

<PropertyGroup>
<ScenarioTestTargetFrameworks>net8.0</ScenarioTestTargetFrameworks>
<UnitTestTargetFrameworks>net8.0</UnitTestTargetFrameworks>
<ScenarioTestTargetFrameworks>net8.0;net9.0</ScenarioTestTargetFrameworks>
<UnitTestTargetFrameworks>net8.0;net9.0</UnitTestTargetFrameworks>
<!-- This is the target framework version of the built tests picked up to send to Helix -->
<XUnitPublishTargetFramework>net8.0</XUnitPublishTargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ public static void BasicHttp_Async_Close_Proxy_WithSingleThreadedSyncContext()

private static string StreamToString(Stream stream)
{
stream.Read(Array.Empty<byte>(), 0, 0);
stream.ReadExactly(Array.Empty<byte>(), 0, 0);
var reader = new StreamReader(stream, Encoding.UTF8);
return reader.ReadToEnd();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public static void DirectlySettingCertificateCredential()
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
var factory = new ChannelFactory<IWcfService>(binding, new EndpointAddress(FakeAddress.HttpsAddress));
byte[] certificateBytes = Convert.FromBase64String(BasicHttpsBindingTest.AUserCertificate);
#pragma warning disable SYSLIB0057
var certificate = new X509Certificate2(certificateBytes);
#pragma warning restore SYSLIB0057
factory.Credentials.ClientCertificate.Certificate = certificate;
var channel = factory.CreateChannel();
Assert.Throws<PlatformNotSupportedException>(() => channel.Echo("hello"));
Expand Down
Loading