From 37eb29abe0a5486ff5bcdbfd3934d9b72658544f Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Thu, 19 Dec 2024 07:08:05 +0100 Subject: [PATCH] better comments Signed-off-by: Tim Vaillancourt --- go/vt/topo/stats_conn_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/go/vt/topo/stats_conn_test.go b/go/vt/topo/stats_conn_test.go index 31b7cb36072..d58f5ab6918 100644 --- a/go/vt/topo/stats_conn_test.go +++ b/go/vt/topo/stats_conn_test.go @@ -29,12 +29,16 @@ import ( "vitess.io/vitess/go/vt/vterrors" ) +// testStatsConnReadSem is a semaphore for unit tests. +// It intentionally has a concurrency limit of '1' to +// allow semaphore contention in tests. var testStatsConnReadSem = semaphore.NewWeighted(1) +// testStatsConnStatsReset resets StatsConn-based stats. func testStatsConnStatsReset() { topoStatsConnErrors.ResetAll() - topoStatsConnTimings.Reset() topoStatsConnReadWaitTimings.Reset() + topoStatsConnTimings.Reset() } // The fakeConn is a wrapper for a Conn that emits stats for every operation