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

[wasm-browser] Test failures in System.Xml.RW.XmlReader.Tests with PlatformNotSupportedException #41163

Closed
directhex opened this issue Aug 21, 2020 · 2 comments · Fixed by #41936
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Xml
Milestone

Comments

@directhex
Copy link
Member

We should be skipping these tests on wasm:

[14:12:17] dbug: test-browser[0]
      [FAIL] System.Xml.Tests.AsyncReaderLateInitTests.InitializationWithUriOnNonAsyncReaderTrows
      
[14:12:17] dbug: test-browser[0]
      Assert.Throws() Failure
      
[14:12:17] dbug: test-browser[0]
      Expected: typeof(System.Net.Http.HttpRequestException)
      
[14:12:17] dbug: test-browser[0]
      Actual:   typeof(System.PlatformNotSupportedException): Cannot wait on monitors on this runtime.
      
[14:12:17] dbug: test-browser[0]
      ---- System.PlatformNotSupportedException : Cannot wait on monitors on this runtime.
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Monitor.Wait(Object obj, Int32 millisecondsTimeout, Boolean exitContext)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Monitor.Wait(Object obj, Int32 millisecondsTimeout)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Tasks.Task.InternalWaitCore(Int32 millisecondsTimeout, CancellationToken cancellationToken)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Tasks.Task.InternalWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlTextReaderImpl.FinishInitUriString()
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.Tests.AsyncReaderLateInitTests.<>c.<InitializationWithUriOnNonAsyncReaderTrows>b__9_0()
      
[14:12:17] dbug: test-browser[0]
      ----- Inner Stack Trace -----
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Monitor.Wait(Object obj, Int32 millisecondsTimeout, Boolean exitContext)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Monitor.Wait(Object obj, Int32 millisecondsTimeout)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Tasks.Task.InternalWaitCore(Int32 millisecondsTimeout, CancellationToken cancellationToken)
      
[14:12:17] dbug: test-browser[0]
         at System.Threading.Tasks.Task.InternalWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlTextReaderImpl.FinishInitUriString()
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings)
      
[14:12:17] dbug: test-browser[0]
         at System.Xml.Tests.AsyncReaderLateInitTests.<>c.<InitializationWithUriOnNonAsyncReaderTrows>b__9_0()

https://helix.dot.net/api/2019-06-17/jobs/ca5a7a0a-81f9-4293-8570-e1481e234e7e/workitems/System.Xml.RW.XmlReader.Tests/console

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Xml untriaged New issue has not been triaged by the area owner labels Aug 21, 2020
@ghost
Copy link

ghost commented Aug 21, 2020

Tagging subscribers to this area: @buyaa-n, @krwq
See info in area-owners.md if you want to be subscribed.

@steveisok steveisok added arch-wasm WebAssembly architecture and removed untriaged New issue has not been triaged by the area owner labels Aug 21, 2020
@steveisok steveisok added this to the 6.0.0 milestone Aug 21, 2020
@akoeplinger
Copy link
Member

We probably didn't see this with the v8 runs since I assume we ran into the file:// case here:

if (uri.Scheme == "file")
{
return new FileStream(uri.LocalPath, FileMode.Open, FileAccess.Read, FileShare.Read, 1);
}
else
{
// This code should be changed if HttpClient ever gets real synchronous methods. For now,
// we just use the asynchronous methods and block waiting for them to complete.
return GetNonFileStreamAsync(uri, credentials, proxy).GetAwaiter().GetResult();
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Xml
Projects
None yet
5 participants