Skip to content

Commit

Permalink
add runtime stats test
Browse files Browse the repository at this point in the history
  • Loading branch information
krrrr38 committed Jan 16, 2023
1 parent 9d2dffd commit d9c2871
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions server/scheduled/runtime_stats_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package scheduled

import (
"testing"

"github.com/uber-go/tally"
)

func TestRuntimeStatCollector_Run(t *testing.T) {
scope := tally.NewTestScope("test", nil)
r := NewRuntimeStats(scope)
r.Run()

expGaugeCount := 25
if len(scope.Snapshot().Gauges()) != expGaugeCount {
t.Errorf("Expected %d gauges but got %d", expGaugeCount, len(scope.Snapshot().Gauges()))
}
}

0 comments on commit d9c2871

Please sign in to comment.