Skip to content

Commit

Permalink
fix conf tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OhmSpectator committed Nov 8, 2024
1 parent a763555 commit 66ecf50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/pillar/cmd/watcher/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func TestGoroutinesMonitorLeak(t *testing.T) {
// Adjust stats slice size dynamically based on updated parameters
func TestGoroutinesMonitorUpdateParamsKeepStatsDecrease(t *testing.T) {
backupOut := logger.Out
bakcupLevel := logger.Level
backupLevel := logger.Level
// Create a pipe to capture log output
r, w, _ := os.Pipe()
logger.Out = w
Expand Down Expand Up @@ -366,7 +366,7 @@ func TestGoroutinesMonitorUpdateParamsKeepStatsDecrease(t *testing.T) {
_ = w.Close()
output, _ := io.ReadAll(r)
logger.Out = backupOut
logger.Level = bakcupLevel
logger.Level = backupLevel

expectedNewSize := int(keepStatsFor / checkInterval)
expectedRemovedEntries := oldSize - expectedNewSize
Expand All @@ -388,7 +388,7 @@ func TestGoroutinesMonitorUpdateParamsKeepStatsDecrease(t *testing.T) {
// Adjust stats slice size dynamically based on updated parameters
func TestGoroutinesMonitorUpdateParamsKeepStatsIncrease(t *testing.T) {
backupOut := logger.Out
bakcupLevel := logger.Level
backupLevel := logger.Level
// Create a pipe to capture log output
r, w, _ := os.Pipe()
logger.Out = w
Expand Down Expand Up @@ -425,7 +425,7 @@ func TestGoroutinesMonitorUpdateParamsKeepStatsIncrease(t *testing.T) {
_ = w.Close()
output, _ := io.ReadAll(r)
logger.Out = backupOut
logger.Level = bakcupLevel
logger.Level = backupLevel

expectedNewSize := int(keepStatsFor / checkInterval)

Expand Down

0 comments on commit 66ecf50

Please sign in to comment.