diff --git a/common/metrics/metricstest/capture_handler.go b/common/metrics/metricstest/capture_handler.go index 107241062d8d..b88e9044e9e1 100644 --- a/common/metrics/metricstest/capture_handler.go +++ b/common/metrics/metricstest/capture_handler.go @@ -25,6 +25,7 @@ package metricstest import ( + "io" "sync" "time" @@ -142,5 +143,13 @@ func (c *CaptureHandler) Histogram(name string, unit metrics.MetricUnit) metrics return metrics.HistogramFunc(func(v int64, tags ...metrics.Tag) { c.record(name, v, unit, tags...) }) } +func (c *CaptureHandler) Close() error { + return nil +} + +func (c *CaptureHandler) BatchStart(_ string) (metrics.Handler, io.Closer) { + return c, c +} + // Stop implements [metrics.Handler.Stop]. func (*CaptureHandler) Stop(log.Logger) {} diff --git a/service/history/historybuilder/history_builder_categorization_test.go b/service/history/historybuilder/history_builder_categorization_test.go index 0d0bf9316c78..430f828bec5b 100644 --- a/service/history/historybuilder/history_builder_categorization_test.go +++ b/service/history/historybuilder/history_builder_categorization_test.go @@ -25,6 +25,7 @@ package historybuilder import ( + "io" "testing" "time" @@ -66,6 +67,14 @@ func (h StubHandler) Histogram(_ string, _ metrics.MetricUnit) metrics.Histogram func (h StubHandler) Stop(_ log.Logger) {} +func (h StubHandler) Close() error { + return nil +} + +func (h StubHandler) BatchStart(_ string) (metrics.Handler, io.Closer) { + return h, h +} + func TestHistoryBuilder_IsDirty(t *testing.T) { hb := HistoryBuilder{EventStore: EventStore{}} if hb.IsDirty() {