Skip to content

Desktop and Core behavior differences in System.Net.Requests #20873

Closed

Description

@davidsh

There are some differences in behavior between .NET Framework (Desktop) and .NET Core which are causing these tests to fail:

xUnit.net Console Runner (64-bit .NET 4.0.30319.42000)
Discovering: System.Net.Requests.Tests
Discovered: System.Net.Requests.Tests
Starting: System.Net.Requests.Tests
System.Net.Tests.HttpWebRequestHeaderTest.Ctor_VerifyHttpRequestDefaults(remoteServer: http://corefx-net.cloudapp.net/Echo.ashx) [FAIL]
Assert.Equal() Failure
Expected: 0
Actual: 64
Stack Trace:
s:\GitHub\corefx\src\System.Net.Requests\tests\HttpWebRequestHeaderTest.cs(32,0): at System.Net.Tests.HttpWebRequestHeaderTest.Ctor_VerifyHttpRequest
Defaults(Uri remoteServer)
System.Net.Tests.HttpWebRequestHeaderTest.HttpWebRequest_ServicePoint_Throws(remoteServer: http://corefx-net.cloudapp.net/Echo.ashx) [FAIL]
Assert.Throws() Failure
Expected: typeof(System.PlatformNotSupportedException)
Actual: (No exception was thrown)
Stack Trace:
s:\GitHub\corefx\src\System.Net.Requests\tests\HttpWebRequestHeaderTest.cs(81,0): at System.Net.Tests.HttpWebRequestHeaderTest.HttpWebRequest_Service
Point_Throws(Uri remoteServer)
System.Net.Tests.HttpWebRequestHeaderTest.HttpWebRequest_ServicePoint_Throws(remoteServer: https://corefx-net.cloudapp.net/Echo.ashx) [FAIL]
Assert.Throws() Failure
Expected: typeof(System.PlatformNotSupportedException)
Actual: (No exception was thrown)
Stack Trace:
s:\GitHub\corefx\src\System.Net.Requests\tests\HttpWebRequestHeaderTest.cs(81,0): at System.Net.Tests.HttpWebRequestHeaderTest.HttpWebRequest_Service
Point_Throws(Uri remoteServer)
System.Net.Tests.HttpWebResponseHeaderTest.HttpWebResponse_Close_Success [FAIL]
Assert.Throws() Failure
Expected: typeof(System.ObjectDisposedException)
Actual: (No exception was thrown)

Activity

  1. self-assigned this
    on Apr 21, 2017
  2. transferred this issue fromdotnet/corefxon Jan 31, 2020
  3. added this to the 2.0.0 milestone on Jan 31, 2020
  4. ghost locked as resolved and limited conversation to collaborators on Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.Netbugtest-run-desktop

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions