MCPcopy
hub / github.com/grpc/grpc-go / checkServerStats

Function checkServerStats

stats/stats_test.go:816–827  ·  view source on GitHub ↗
(t *testing.T, got []*gotData, expect *expectedData, checkFuncs []func(t *testing.T, d *gotData, e *expectedData))

Source from the content-addressed store, hash-verified

814}
815
816func checkServerStats(t *testing.T, got []*gotData, expect *expectedData, checkFuncs []func(t *testing.T, d *gotData, e *expectedData)) {
817 if len(got) != len(checkFuncs) {
818 for i, g := range got {
819 t.Errorf(" - %v, %T", i, g.s)
820 }
821 t.Fatalf("got %v stats, want %v stats", len(got), len(checkFuncs))
822 }
823
824 for i, f := range checkFuncs {
825 f(t, got[i], expect)
826 }
827}
828
829func testServerStats(t *testing.T, tc *testConfig, cc *rpcConfig, checkFuncs []func(t *testing.T, d *gotData, e *expectedData)) {
830 h := &statshandler{}

Callers 1

testServerStatsFunction · 0.85

Calls 2

ErrorfMethod · 0.65
FatalfMethod · 0.65

Tested by

no test coverage detected