Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Tidy code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Baliedge committed Mar 8, 2024
1 parent 38b0f79 commit f00d4e2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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\"}")
Expand All @@ -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++ {
Expand Down

0 comments on commit f00d4e2

Please sign in to comment.