reduce test explorer logging

This commit is contained in:
Matt Parker
2025-11-19 23:47:36 +10:00
parent 0ed73ae1aa
commit fc4eed8d0a
2 changed files with 5 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
using SharpIDE.Application.Features.Analysis;
using Microsoft.Extensions.Logging;
using SharpIDE.Application.Features.Analysis;
using SharpIDE.Application.Features.Evaluation;
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
using SharpIDE.Application.Features.Testing.Client;
@@ -6,9 +7,10 @@ using SharpIDE.Application.Features.Testing.Client.Dtos;
namespace SharpIDE.Application.Features.Testing;
public class TestRunnerService(RoslynAnalysis roslynAnalysis)
public class TestRunnerService(RoslynAnalysis roslynAnalysis, ILogger<TestRunnerService> logger)
{
private readonly RoslynAnalysis _roslynAnalysis = roslynAnalysis;
private readonly ILogger<TestRunnerService> _logger = logger;
public async Task<List<TestNode>> DiscoverTests(SharpIdeSolutionModel solutionModel)
{
@@ -29,7 +31,7 @@ public class TestRunnerService(RoslynAnalysis roslynAnalysis)
await client.ExitAsync();
allDiscoveredTestNodes.AddRange(testNodeUpdates.Select(tn => tn.Node));
}
_logger.LogInformation("Discovered {DiscoveredTestCount} tests", allDiscoveredTestNodes.Count);
return allDiscoveredTestNodes;
}

View File

@@ -46,7 +46,6 @@ public partial class TestExplorerPanel : Control
await _buildService.MsBuildAsync(solution.FilePath);
}
var testNodes = await _testRunnerService.DiscoverTests(solution);
testNodes.ForEach(s => GD.Print(s.DisplayName));
var scenes = testNodes.Select(s =>
{
var entry = _testNodeEntryScene.Instantiate<TestNodeEntry>();