Skip to content

Commit 00d19bf

Browse files
author
MPCoreDeveloper
committed
test upgrade xunit v2 to xunit V 3
1 parent a54790a commit 00d19bf

36 files changed

+60
-58
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ jobs:
4343
run: dotnet build SharpCoreDB.CI.slnf --configuration Release --no-restore
4444

4545
- name: Test
46-
run: dotnet test SharpCoreDB.CI.slnf --configuration Release --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage" -- xunit.parallelizeTestCollections=false
46+
run: dotnet test SharpCoreDB.CI.slnf --configuration Release --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage" --filter "Category!=Performance&Category!=Debug"
4747
timeout-minutes: 20
48+
env:
49+
CI: "true"
50+
GITHUB_ACTIONS: "true"
4851

4952
- name: Upload test results
5053
if: always()

tests/SharpCoreDB.Tests/AesGcmConcurrencyTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ namespace SharpCoreDB.Tests;
88
using System.Collections.Concurrent;
99
using System.Security.Cryptography;
1010
using System.Text;
11-
using Xunit.Abstractions;
1211

1312
/// <summary>
1413
/// Concurrency tests for AesGcmEncryption to verify thread-safety.

tests/SharpCoreDB.Tests/AsyncTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace SharpCoreDB.Tests;
66
/// Tests for async database operations.
77
/// </summary>
88
[Collection("PerformanceTests")]
9+
[Trait("Category", "Performance")]
910
public class AsyncTests
1011
{
1112
private readonly DatabaseFactory _factory;

tests/SharpCoreDB.Tests/BTreeRangeScanDebugTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace SharpCoreDB.Tests;
66

7+
[Trait("Category", "Debug")]
78
public class BTreeRangeScanDebugTest
89
{
910
[Fact]

tests/SharpCoreDB.Tests/BlockRegistryBatchingTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace SharpCoreDB.Tests;
1919
/// Target: Reduce flushes from 500 to &lt;10 for batch updates.
2020
/// </summary>
2121
[Collection("PerformanceTests")]
22+
[Trait("Category", "Performance")]
2223
public class BlockRegistryBatchingTests : IDisposable
2324
{
2425
private readonly string _testDbPath;

tests/SharpCoreDB.Tests/CompiledQueryTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace SharpCoreDB.Tests;
1717
/// Goal: 1000 identical SELECTs in less than 8ms total.
1818
/// </summary>
1919
[Collection("PerformanceTests")]
20+
[Trait("Category", "Performance")]
2021
public class CompiledQueryTests
2122
{
2223
private readonly string _testDbPath;

tests/SharpCoreDB.Tests/Complete10KInsertPerformanceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Diagnostics;
77
using Microsoft.Extensions.DependencyInjection;
88
using Xunit;
9-
using Xunit.Abstractions;
109
using SharpCoreDB;
1110
using SharpCoreDB.Services;
1211

@@ -24,6 +23,7 @@ namespace SharpCoreDB.Tests;
2423
/// 5. UseOptimizedInsertPath (delayed transpose + buffered encryption)
2524
/// </summary>
2625
[Collection("PerformanceTests")]
26+
[Trait("Category", "Performance")]
2727
public sealed class Complete10KInsertPerformanceTest : IDisposable
2828
{
2929
private readonly ITestOutputHelper _output;

tests/SharpCoreDB.Tests/DebugBatchTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using Xunit;
2-
using Xunit.Abstractions;
32
using SharpCoreDB;
43
using System.Collections.Generic;
54
using System.IO;
65
using Microsoft.Extensions.DependencyInjection;
76

87
namespace SharpCoreDB.Tests;
98

9+
[Trait("Category", "Debug")]
1010
public class DebugBatchTest
1111
{
1212
private readonly ITestOutputHelper _output;

tests/SharpCoreDB.Tests/DebugCompilerTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
namespace SharpCoreDB.Tests;
77

8+
[Trait("Category", "Debug")]
89
public class DebugCompilerTest
910
{
1011
[Fact]

tests/SharpCoreDB.Tests/GenericLoadTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,8 @@ public void ColumnStore_WithMetrics_SIMD_Aggregates_100k()
440440

441441
aggSw.Stop();
442442

443-
// Assert: All aggregates < 50ms for 100k records (relaxed for CI/different hardware/cold start)
444-
// Previous threshold of 20ms was too strict and caused flaky failures
445-
Assert.True(aggSw.ElapsedMilliseconds < 50,
446-
$"Expected < 50ms for all aggregates, got {aggSw.ElapsedMilliseconds}ms");
443+
// Assert: All aggregates < 50ms for 100k records locally (relaxed for CI/different hardware/cold start)
444+
TestEnvironment.AssertPerformance(aggSw.ElapsedMilliseconds, 50, label: "SIMD aggregates 100k");
447445

448446
Console.WriteLine($" All 5 aggregates: {aggSw.Elapsed.TotalMilliseconds:F3}ms");
449447
Console.WriteLine($" SUM(Id): {sum:N0}");

0 commit comments

Comments
 (0)