Skip to content

Conversation

@raphaelm22
Copy link

The Verify.MicrosoftLogging does not work well after updating to version 4 when it's used WebApplicationFactory together.

When run, the exception below is thrown:

System.Exception: 'Recording.Start must be called before Recording.Add'
System.Exception
  HResult=0x80131500
  Message=Recording.Start must be called before Recording.Add
  Source=Verify
  StackTrace:
   at VerifyTests.Recording.CurrentState(String caller) in /_/src/Verify/Recording/Recording.cs:line 70

image

… version 4 when it's used WebApplicationFactory together.
@raphaelm22
Copy link
Author

@dotnet-policy-service agree

@SimonCropp
Copy link
Member

the build server timed out. it did not result in the exception you pointed to

@raphaelm22
Copy link
Author

I really struggled to create a test that fails, but I don't know why the test kept running without throwing the exception pointed. Because of that, I setted a Timeout in the Fact attribute. I know it wasn't what you expected, but it's the best I could do.

But you can see the exception on output:
image

To debug when the exception is thrown you can do this to break on all exceptions:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants