Skip to content

Commit b271428

Browse files
committed
test/integration: adapt numbers in TestAPIServerTransportMetrics with less rest client creations
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
1 parent 834cd7c commit b271428

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/integration/client/metrics/metrics_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ func TestAPIServerTransportMetrics(t *testing.T) {
5757

5858
// IMPORTANT: reflect the current values if the test changes
5959
// client_test.go:1407: metric rest_client_transport_cache_entries 3
60-
// client_test.go:1407: metric rest_client_transport_create_calls_total{result="hit"} 61
60+
// client_test.go:1407: metric rest_client_transport_create_calls_total{result="hit"} 20
6161
// client_test.go:1407: metric rest_client_transport_create_calls_total{result="miss"} 3
6262
hits1, misses1, entries1 := checkTransportMetrics(t, client)
6363
// hit ratio at startup depends on multiple factors
64-
if (hits1*100)/(hits1+misses1) < 90 {
64+
if (hits1*100)/(hits1+misses1) < 85 {
6565
t.Fatalf("transport cache hit ratio %d lower than 90 percent", (hits1*100)/(hits1+misses1))
6666
}
6767

@@ -114,7 +114,7 @@ func TestAPIServerTransportMetrics(t *testing.T) {
114114
}
115115

116116
// hit ratio after startup should grow since no new transports are expected
117-
if (hits2*100)/(hits2+misses2) < 95 {
117+
if (hits2*100)/(hits2+misses2) < 85 {
118118
t.Fatalf("transport cache hit ratio %d lower than 95 percent", (hits2*100)/(hits2+misses2))
119119
}
120120
}

0 commit comments

Comments
 (0)