Skip to content

Commit

Permalink
Use different metric name to pass static analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Yoon Park <[email protected]>
  • Loading branch information
yoongon committed Jul 12, 2023
1 parent c61e30b commit 99f31e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/scaling/scaledjob/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ func TestTargetAverageValue(t *testing.T) {
createMetricSpec(1, metricName),
createMetricSpec(1, metricName),
}

metricName = "s1-messageCount"
targetAverageValue = getTargetAverageValue(specs)
assert.Equal(t, float64(1), targetAverageValue)
// 5 5 3 -> 4.333333333333333
Expand All @@ -27,6 +29,8 @@ func TestTargetAverageValue(t *testing.T) {
createMetricSpec(5, metricName),
createMetricSpec(3, metricName),
}

metricName = "s2-messageCount"
targetAverageValue = getTargetAverageValue(specs)
assert.Equal(t, 4.333333333333333, targetAverageValue)

Expand All @@ -36,6 +40,8 @@ func TestTargetAverageValue(t *testing.T) {
createMetricSpec(5, metricName),
createMetricSpec(4, metricName),
}

metricName = "s3-messageCount"
targetAverageValue = getTargetAverageValue(specs)
assert.Equal(t, 4.666666666666667, targetAverageValue)
}
Expand Down

0 comments on commit 99f31e4

Please sign in to comment.