Skip to content

Tests are sent back as in-progress and passed #5348

Description

Test updates are batched by count and time, and if test is in progress and finishes in the same batch we send the same test case info twice in the same batch.

Test updates can simply discard in-progress update for any test case for which they already have a result.

Repro: Just run any test.

 {
"jsonrpc": "2.0",
"method": "testing/testUpdates/tests",
"params": {
"runId": "d336342f-705a-4171-9b44-80f58d2957e3",
"changes": [
{
"node": {
"uid": "Microsoft.NET.TestAnywhere.XUnit.UnitTest1.TestWithCategory",
"display-name": "Microsoft.NET.TestAnywhere.XUnit.UnitTest1.TestWithCategory",
"traits": [
{
"A": "UnitTest"
}
],
"vstest.original-executor-uri": "executor://xunit/VsTestRunner2/net",
"vstest.TestCase.Id": "94afc2e0-ebf9-cbb1-3115-7751ede4fefc",
"vstest.TestCase.FullyQualifiedName": "Microsoft.NET.TestAnywhere.XUnit.UnitTest1.TestWithCategory",
"node-type": "action",
"execution-state": "in-progress"
},
"parent": null
},
{
"node": {
"uid": "Microsoft.NET.TestAnywhere.XUnit.UnitTest1.TestWithCategory",
"display-name": "Microsoft.NET.TestAnywhere.XUnit.UnitTest1.TestWithCategory",
"time.start-utc": "2023-10-31T15:06:14.7410985+00:00",
"time.stop-utc": "2023-10-31T15:06:14.7410985+00:00",
"time.duration-ms": 4,
"traits": [
{
"A": "UnitTest"
}
],
"vstest.original-executor-uri": "executor://xunit/VsTestRunner2/net",
"vstest.TestCase.Id": "94afc2e0-ebf9-cbb1-3115-7751ede4fefc",
"vstest.TestCase.FullyQualifiedName": "Microsoft.NET.TestAnywhere.XUnit.UnitTest1.TestWithCategory",
"node-type": "action",
"execution-state": "passed"
},
"parent": null
}
]
}
}

Originally posted by Jakub Jareš (@nohwnd) in https://github.com/microsoft/testanywhere/issues/1509

Activity

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

Metadata

Metadata

Labels

area/mtpMicrosoft.Testing.Platform core library.area/performanceRuntime / build performance / efficiency.area/server-mode-jsonrpcMTP server mode - JSON RPC transport.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions