refactor(claude-do): merge OperationTiming hinter Kill-Switch, Default aus (vor dem näc
ClaudeDo-Task: ae170c8b-33cf-4cf3-932e-865fbdd2afa6
This commit is contained in:
@@ -96,6 +96,27 @@ public class OperationTimingTests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Record_DoesNothingWhenDisabled()
|
||||
{
|
||||
var dir = Path.Combine(Path.GetTempPath(), "claudedo_optiming_" + Guid.NewGuid().ToString("N"));
|
||||
var path = Path.Combine(dir, "operation-timing.ndjson");
|
||||
var sink = new OperationTiming(path, enabled: false);
|
||||
|
||||
try
|
||||
{
|
||||
var exception = Record.Exception(() => sink.Record("hub", "RunNow", TimeSpan.FromMilliseconds(1), ok: false));
|
||||
|
||||
Assert.Null(exception);
|
||||
Assert.False(File.Exists(path));
|
||||
Assert.False(Directory.Exists(dir));
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (Directory.Exists(dir)) Directory.Delete(dir, recursive: true);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Record_SwallowsWriteFailureInsteadOfThrowing()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user