From 198258b6412301b734c0644951f023436207bede Mon Sep 17 00:00:00 2001 From: perennial Date: Tue, 24 Sep 2024 16:28:53 +1000 Subject: [PATCH] Remove unused funcs in token_manager_test --- server/token_manager/token_manager_test.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/server/token_manager/token_manager_test.go b/server/token_manager/token_manager_test.go index 8c7195e..a8f884f 100644 --- a/server/token_manager/token_manager_test.go +++ b/server/token_manager/token_manager_test.go @@ -155,27 +155,6 @@ func TestResetAllTokens(t *testing.T) { } } -// TestGetterMethods ensures that the getter methods return the correct values -// that were set during TokenManager initialization. -func TestGetterMethods(t *testing.T) { - maxRetries := 5 - baseTimeout := 1000 * time.Millisecond - maxBackoffTime := 32000 * time.Millisecond - tm := NewTokenManager([]string{"token1"}, maxRetries, baseTimeout, maxBackoffTime, "round-robin") - - if tm.GetMaxRetries() != maxRetries { - t.Errorf("Expected GetMaxRetries to return %d, got %d", maxRetries, tm.GetMaxRetries()) - } - - if tm.GetBaseTimeout() != baseTimeout { - t.Errorf("Expected GetBaseTimeout to return %v, got %v", baseTimeout, tm.GetBaseTimeout()) - } - - if tm.GetMaxBackoffTime() != maxBackoffTime { - t.Errorf("Expected GetMaxBackoffTime to return %v, got %v", maxBackoffTime, tm.GetMaxBackoffTime()) - } -} - // TestGetFallbackToken verifies that when all tokens are timed out, // the TokenManager correctly selects and resets a fallback token. func TestGetFallbackToken(t *testing.T) {