Skip to content

Commit

Permalink
func rename
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Dec 16, 2024
1 parent 176111c commit 91e9640
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go/vt/topo/stats_conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ func (st *fakeConn) IsReadOnly() bool {
return st.readOnly
}

// createSemaphoreContention simulates semaphore contention on the test read semaphore.
func createSemaphoreContention(ctx context.Context, duration time.Duration) {
// createTestReadSemaphoreContention simulates semaphore contention on the test read semaphore.
func createTestReadSemaphoreContention(ctx context.Context, duration time.Duration) {
if err := testStatsConnReadSem.Acquire(ctx, 1); err != nil {
panic(err)
}
Expand All @@ -199,7 +199,7 @@ func TestStatsConnTopoListDir(t *testing.T) {
statsConn := NewStatsConn("global", conn, testStatsConnReadSem)
ctx := context.Background()

go createSemaphoreContention(ctx, 100*time.Millisecond)
go createTestReadSemaphoreContention(ctx, 100*time.Millisecond)
statsConn.ListDir(ctx, "", true)
timingCounts := topoStatsConnTimings.Counts()["ListDir.global"]
if got, want := timingCounts, int64(1); got != want {
Expand Down Expand Up @@ -286,7 +286,7 @@ func TestStatsConnTopoGet(t *testing.T) {
statsConn := NewStatsConn("global", conn, testStatsConnReadSem)
ctx := context.Background()

go createSemaphoreContention(ctx, time.Millisecond*100)
go createTestReadSemaphoreContention(ctx, time.Millisecond*100)
statsConn.Get(ctx, "")
timingCounts := topoStatsConnTimings.Counts()["Get.global"]
if got, want := timingCounts, int64(1); got != want {
Expand Down

0 comments on commit 91e9640

Please sign in to comment.