Commit 95cc5b1
[Internal] Tests: Adds MSTest v3.7.3 upgrade from v1.x (#5743)
## Changes
Upgrades MSTest from v1.x to v3.7.3 across core test projects, matching
the FaultInjection project which already uses v3.7.3.
### Package upgrades
| Project | MSTest Before | MSTest After | Test SDK Before | Test SDK
After |
|---|---|---|---|---|
| \Microsoft.Azure.Cosmos.Tests\ | 1.2.0 | **3.7.3** | 16.2.0 |
**17.12.0** |
| \Microsoft.Azure.Cosmos.EmulatorTests\ | 1.3.2 | **3.7.3** | 16.2.0 |
**17.12.0** |
| \Microsoft.Azure.Cosmos.Performance.Tests\ | 1.2.0 | **3.7.3** | N/A |
N/A |
### Class-level test parallelization
Added \[assembly: Parallelize(Scope = ExecutionScope.ClassLevel)]\ to
unit tests for intra-process parallelism (12 workers on CI agents).
### MSTest v3 analyzer/API fixes
- **MSTEST0002** (4): Removed \[TestClass]\ from private nested
\Implementation\ classes — tests discovered via public outer wrapper
classes
- **MSTEST0003** (8): Removed \[TestMethod]\ from abstract base class
parameterized methods — invoked by outer class wrappers with \[DataRow]\
- **MSTEST0014** (2): Added missing \[TestMethod]\ to
\TriggersTests.ValidatePreTriggerTest\ and
\CosmosItemIntegrationTests.ExecuteTransactionalBatch_WhenBinaryEncodingEnabled_ShouldCompleteSuccessfully\
— these had \[DataRow]\ but no \[TestMethod]\, so were not being
discovered/run
- **CS0411/CS1503** (3): Fixed \Assert.AreNotEqual\ type inference
(Guid→string, int→TimeSpan, Uri→string)
### Custom RetriableTestClass (preserved)
The emulator tests' custom \TestClassAttribute\ providing automatic
retry is preserved — it's fully compatible with v3. MSTest v3's
\[Retry]\ is method-level only and cannot replicate assembly-wide retry
without touching hundreds of methods.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent fbd7d28 commit 95cc5b1
15 files changed
Lines changed: 19 additions & 28 deletions
File tree
- Microsoft.Azure.Cosmos/tests
- Microsoft.Azure.Cosmos.EmulatorTests
- Fluent
- Microsoft.Azure.Cosmos.Performance.Tests
- Microsoft.Azure.Cosmos.Tests
- Pagination
- Query
- Scenarios
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| |||
2243 | 2244 | | |
2244 | 2245 | | |
2245 | 2246 | | |
2246 | | - | |
| 2247 | + | |
2247 | 2248 | | |
2248 | 2249 | | |
2249 | 2250 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2390 | 2390 | | |
2391 | 2391 | | |
2392 | 2392 | | |
2393 | | - | |
| 2393 | + | |
2394 | 2394 | | |
2395 | 2395 | | |
2396 | 2396 | | |
| |||
2407 | 2407 | | |
2408 | 2408 | | |
2409 | 2409 | | |
2410 | | - | |
| 2410 | + | |
2411 | 2411 | | |
2412 | 2412 | | |
2413 | 2413 | | |
| |||
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
| 500 | + | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
| |||
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
146 | | - | |
147 | 144 | | |
148 | 145 | | |
149 | 146 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
0 commit comments