MCPcopy
hub / github.com/google/mtail / ExpectMapExpvarDeltaWithDeadline

Method ExpectMapExpvarDeltaWithDeadline

internal/mtail/testing.go:142–145  ·  view source on GitHub ↗

ExpectMapExpvarMetricDeltaWithDeadline returns a deferrable function which tests if the expvar map metric with name and key has changed by delta within the given deadline, once the function begins. Before returning, it fetches the original value for comparison.

(name, key string, want int64)

Source from the content-addressed store, hash-verified

140
141// ExpectMapExpvarMetricDeltaWithDeadline returns a deferrable function which tests if the expvar map metric with name and key has changed by delta within the given deadline, once the function begins. Before returning, it fetches the original value for comparison.
142func (ts *TestServer) ExpectMapExpvarDeltaWithDeadline(name, key string, want int64) func() {
143 ts.tb.Helper()
144 return testutil.ExpectMapExpvarDeltaWithDeadline(ts.tb, name, key, want)
145}
146
147// GetProgramMetric fetches the datum of the program metric name.
148func (ts *TestServer) GetProgramMetric(name, prog string) datum.Datum {

Callers 8

TestLogRotationByRenameFunction · 0.80
TestBasicTailFunction · 0.80
TestLogDeletionFunction · 0.80
TestNewProgFunction · 0.80

Calls 1

Tested by 8

TestLogRotationByRenameFunction · 0.64
TestBasicTailFunction · 0.64
TestLogDeletionFunction · 0.64
TestNewProgFunction · 0.64