From b5e5529acef390dbca32d79e5e4b58912143e906 Mon Sep 17 00:00:00 2001 From: chronark Date: Fri, 20 Sep 2024 18:46:13 +0200 Subject: [PATCH] fix(circuitbreaker): remove unnecessary log message in preflight function fix(ratelimit_replication_test): correct index to call Ratelimit on correct node --- apps/agent/pkg/circuitbreaker/lib.go | 1 - apps/agent/services/ratelimit/ratelimit_replication_test.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/agent/pkg/circuitbreaker/lib.go b/apps/agent/pkg/circuitbreaker/lib.go index 04ff5fc0aa..327ebb2b09 100644 --- a/apps/agent/pkg/circuitbreaker/lib.go +++ b/apps/agent/pkg/circuitbreaker/lib.go @@ -169,7 +169,6 @@ func (cb *CB[Res]) preflight(ctx context.Context) error { now := cb.config.clock.Now() if now.After(cb.resetCountersAt) { - cb.logger.Info().Msg("resetting circuit breaker") cb.requests = 0 cb.successes = 0 cb.failures = 0 diff --git a/apps/agent/services/ratelimit/ratelimit_replication_test.go b/apps/agent/services/ratelimit/ratelimit_replication_test.go index 3ad69eacb2..8e93fc19e7 100644 --- a/apps/agent/services/ratelimit/ratelimit_replication_test.go +++ b/apps/agent/services/ratelimit/ratelimit_replication_test.go @@ -105,7 +105,7 @@ func TestSync(t *testing.T) { } // Figure out who is the origin - _, err := nodes[1].srv.Ratelimit(ctx, req) + _, err := nodes[0].srv.Ratelimit(ctx, req) require.NoError(t, err) time.Sleep(5 * time.Second)