Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] Flaky unit tests with InternalServerError #911

@vcolin7

Description

@vcolin7

Describe the bug

Every now and then a build will fail with a message like the following:

[xUnit.net 00:00:01.22]       Assert.Equal() Failure: Values differ
[xUnit.net 00:00:01.22]       Expected: BadRequest
[xUnit.net 00:00:01.22]       Actual:   InternalServerError
[xUnit.net 00:00:01.22]       Stack Trace:
[xUnit.net 00:00:01.22]         D:\a\_work\1\s\tools\Azure.Mcp.Tools.KeyVault\tests\Azure.Mcp.Tools.KeyVault.UnitTests\Certificate\CertificateImportCommandTests.cs(132,0): at Azure.Mcp.Tools.KeyVault.UnitTests.Certificate.CertificateImportCommandTests.ExecuteAsync_ValidatesRequiredArguments(String argLine, Boolean shouldPassValidation)
[xUnit.net 00:00:01.22]         --- End of stack trace from previous location ---

I've seen it a bunch of times over the last month or two and I'm not sure why the server would just fail. Maybe we're trying to make a call faster than it can start? That said, I thought we're using mocks for unit tests, so there's that.

Expected behavior

All unit tests should always pass if no changes have been made to them.

Actual behavior

Tests occasionally fail with the aforementioned InternalServerError message.

Reproduction Steps

I don't think you can reproduce this, it's occasional.

Environment

CI pipelines on x64 builds

Metadata

Metadata

Assignees

Type

Projects

Status

Not Started

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions