From f00d4e23eba92e6d3fffd4a22aa8cb28a398ff88 Mon Sep 17 00:00:00 2001 From: Shawn Poulson Date: Fri, 8 Mar 2024 15:58:27 -0500 Subject: [PATCH] Tidy code. --- functional_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/functional_test.go b/functional_test.go index f1c25285..5b4057f2 100644 --- a/functional_test.go +++ b/functional_test.go @@ -1497,8 +1497,6 @@ func TestGlobalBehavior(t *testing.T) { upgCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_grpc_request_duration_count{method=\"/pb.gubernator.PeersV1/UpdatePeerGlobals\"}") gprlCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_grpc_request_duration_count{method=\"/pb.gubernator.PeersV1/GetPeerRateLimits\"}") - require.NoError(t, waitForIdle(1*clock.Minute, cluster.GetDaemons()...)) - // When for i := int64(0); i < testCase.Hits; i++ { sendHit(t, owner, makeReq(name, key, 1), guber.Status_UNDER_LIMIT, 999-i) @@ -1610,13 +1608,13 @@ func TestGlobalBehavior(t *testing.T) { require.NoError(t, err) t.Logf("Owner peer: %s", owner.InstanceID) + require.NoError(t, waitForIdle(1*clock.Minute, cluster.GetDaemons()...)) + broadcastCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_broadcast_duration_count") updateCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_global_send_duration_count") upgCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_grpc_request_duration_count{method=\"/pb.gubernator.PeersV1/UpdatePeerGlobals\"}") gprlCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_grpc_request_duration_count{method=\"/pb.gubernator.PeersV1/GetPeerRateLimits\"}") - require.NoError(t, waitForIdle(1*clock.Minute, cluster.GetDaemons()...)) - // When for i := int64(0); i < testCase.Hits; i++ { sendHit(t, peers[0], makeReq(name, key, 1), guber.Status_UNDER_LIMIT, 999-i) @@ -1739,6 +1737,8 @@ func TestGlobalBehavior(t *testing.T) { } t.Logf("Owner peer: %s", owner.InstanceID) + require.NoError(t, waitForIdle(1*clock.Minute, cluster.GetDaemons()...)) + broadcastCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_broadcast_duration_count") updateCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_global_send_duration_count") upgCounters := getPeerCounters(t, cluster.GetDaemons(), "gubernator_grpc_request_duration_count{method=\"/pb.gubernator.PeersV1/UpdatePeerGlobals\"}") @@ -1747,8 +1747,6 @@ func TestGlobalBehavior(t *testing.T) { var wg sync.WaitGroup var mutex sync.Mutex - require.NoError(t, waitForIdle(1*clock.Minute, cluster.GetDaemons()...)) - // When wg.Add(testCase.Hits) for i := 0; i < testCase.Hits; i++ {