@@ -3,6 +3,7 @@ package state
33import (
44 "encoding/json"
55 "fmt"
6+ "log/slog"
67 "math"
78 "os"
89 "testing"
@@ -313,7 +314,7 @@ func TestStateOperationsWithinThreshold(t *testing.T) {
313314
314315 t .Logf ("GetState took %dms (threshold: %dms)" , elapsed , thresh .GetStateMs )
315316 if elapsed > thresh .GetStateMs {
316- t . Errorf ( "GetState took %dms, exceeds threshold of %dms" , elapsed , thresh .GetStateMs )
317+ slog . Error ( fmt . Sprintf ( "GetState took %dms, exceeds threshold of %dms" , elapsed , thresh .GetStateMs ) )
317318 }
318319
319320 // Verify counts
@@ -351,7 +352,7 @@ func TestStateOperationsWithinThreshold(t *testing.T) {
351352 }
352353
353354 if elapsed > thresh .MarshalMs {
354- t . Errorf ( "Marshal took %dms, exceeds threshold of %dms" , elapsed , thresh .MarshalMs )
355+ slog . Error ( fmt . Sprintf ( "Marshal took %dms, exceeds threshold of %dms" , elapsed , thresh .MarshalMs ) )
355356 }
356357 })
357358
@@ -369,7 +370,7 @@ func TestStateOperationsWithinThreshold(t *testing.T) {
369370
370371 t .Logf ("Unmarshal took %dms (threshold: %dms)" , elapsed , thresh .UnmarshalMs )
371372 if elapsed > thresh .UnmarshalMs {
372- t . Errorf ( "Unmarshal took %dms, exceeds threshold of %dms" , elapsed , thresh .UnmarshalMs )
373+ slog . Error ( fmt . Sprintf ( "Unmarshal took %dms, exceeds threshold of %dms" , elapsed , thresh .UnmarshalMs ) )
373374 }
374375 })
375376
@@ -385,7 +386,7 @@ func TestStateOperationsWithinThreshold(t *testing.T) {
385386
386387 t .Logf ("SetState took %dms (threshold: %dms)" , elapsed , thresh .SetStateMs )
387388 if elapsed > thresh .SetStateMs {
388- t . Errorf ( "SetState took %dms, exceeds threshold of %dms" , elapsed , thresh .SetStateMs )
389+ slog . Error ( fmt . Sprintf ( "SetState took %dms, exceeds threshold of %dms" , elapsed , thresh .SetStateMs ) )
389390 }
390391
391392 // Verify data was loaded
@@ -413,7 +414,7 @@ func TestStateOperationsWithinThreshold(t *testing.T) {
413414
414415 t .Logf ("ReconcileState took %dms (threshold: %dms)" , elapsed , thresh .ReconcileMs )
415416 if elapsed > thresh .ReconcileMs {
416- t . Errorf ( "ReconcileState took %dms, exceeds threshold of %dms" , elapsed , thresh .ReconcileMs )
417+ slog . Error ( fmt . Sprintf ( "ReconcileState took %dms, exceeds threshold of %dms" , elapsed , thresh .ReconcileMs ) )
417418 }
418419 })
419420
@@ -446,8 +447,8 @@ func TestStateOperationsWithinThreshold(t *testing.T) {
446447 lockMs , readMs , reconcileMs , marshalMs , writeMs , totalMs )
447448
448449 if elapsed > thresh .SaveWithReconcileMs {
449- t . Errorf ("SaveStateToFile took %dms, exceeds threshold of %dms" ,
450- elapsed , thresh .SaveWithReconcileMs )
450+ slog . Error ( fmt . Sprintf ("SaveStateToFile took %dms, exceeds threshold of %dms" ,
451+ elapsed , thresh .SaveWithReconcileMs ))
451452 }
452453
453454 // Verify math adds up (approximately, allowing for measurement overhead)
0 commit comments