diff --git a/go/vt/throttler/throttler_test.go b/go/vt/throttler/throttler_test.go index 714fbd825b5..74e8784f021 100644 --- a/go/vt/throttler/throttler_test.go +++ b/go/vt/throttler/throttler_test.go @@ -264,7 +264,8 @@ func TestThreadFinished(t *testing.T) { // Max rate update to threadThrottlers happens asynchronously. Wait for it. timer := time.NewTimer(2 * time.Second) - throttlerImpl := throttler.(*ThrottlerImpl) + throttlerImpl, ok := throttler.(*ThrottlerImpl) + require.True(t, ok) for { if throttlerImpl.threadThrottlers[0].getMaxRate() == 2 { timer.Stop()