Skip to content

Commit 62ef9d5

Browse files
Merge pull request #926 from erikdarlingdata/revert/lite-tests-parallel
Revert PR #924: Lite tests parallelization (slowed CI)
2 parents 0f70036 + e46a443 commit 62ef9d5

7 files changed

Lines changed: 18 additions & 64 deletions

Lite.Tests/AnomalyDetectorTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ namespace PerformanceMonitorLite.Tests;
1515
/// methods (batch requests, sessions, query duration, memory), per-metric thresholds,
1616
/// and baseline context metadata.
1717
/// </summary>
18-
[Collection(BaselineProviderCollection.Name)]
1918
public class AnomalyDetectorTests : IDisposable
2019
{
2120
private readonly string _tempDir;

Lite.Tests/BaselineProviderCollection.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.

Lite.Tests/BaselineProviderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace PerformanceMonitorLite.Tests;
1313
/// Tests for BaselineProvider: time-bucketed baseline computation, bucket collapse
1414
/// with hysteresis, restart poisoning exclusion, and division-by-zero handling.
1515
/// </summary>
16-
[Collection(BaselineProviderCollection.Name)]
1716
public class BaselineProviderTests : IDisposable
1817
{
1918
private readonly string _tempDir;

Lite.Tests/FinOpsDuckDbFixture.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

Lite.Tests/FinOpsTests.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,28 @@ namespace PerformanceMonitorLite.Tests;
1515
/// Each test seeds a specific server profile into DuckDB, runs the recommendation or
1616
/// scoring engine, and validates the output (categories, findings, severity, savings).
1717
/// </summary>
18-
public class FinOpsTests : IClassFixture<FinOpsDuckDbFixture>
18+
public class FinOpsTests : IDisposable
1919
{
20+
private readonly string _tempDir;
21+
private readonly string _dbPath;
2022
private readonly DuckDbInitializer _duckDb;
2123

22-
public FinOpsTests(FinOpsDuckDbFixture fixture)
24+
public FinOpsTests()
2325
{
24-
_duckDb = fixture.DuckDb;
26+
_tempDir = Path.Combine(Path.GetTempPath(), "FinOpsTests_" + Guid.NewGuid().ToString("N")[..8]);
27+
Directory.CreateDirectory(_tempDir);
28+
_dbPath = Path.Combine(_tempDir, "test.duckdb");
29+
_duckDb = new DuckDbInitializer(_dbPath);
30+
}
31+
32+
public void Dispose()
33+
{
34+
try
35+
{
36+
if (Directory.Exists(_tempDir))
37+
Directory.Delete(_tempDir, recursive: true);
38+
}
39+
catch { /* Best-effort cleanup */ }
2540
}
2641

2742
/* ── Over-Provisioned Enterprise ── */

Lite.Tests/Lite.Tests.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,4 @@
2020
<ItemGroup>
2121
<ProjectReference Include="..\Lite\PerformanceMonitorLite.csproj" />
2222
</ItemGroup>
23-
24-
<ItemGroup>
25-
<None Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
26-
</ItemGroup>
2723
</Project>

Lite.Tests/xunit.runner.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)