@@ -758,11 +758,12 @@ func TestVerticalShardingFuzz(t *testing.T) {
758
758
// Generate another set of series for testing binary expression and vector matching.
759
759
for i := numSeries ; i < 2 * numSeries ; i ++ {
760
760
prompbLabels := []prompb.Label {{Name : "job" , Value : "test" }, {Name : "series" , Value : strconv .Itoa (i )}}
761
- if i % 3 == 0 {
761
+ switch i % 3 {
762
+ case 0 :
762
763
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "200" })
763
- } else if i % 3 == 1 {
764
+ case 1 :
764
765
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "400" })
765
- } else {
766
+ default :
766
767
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "500" })
767
768
}
768
769
series := e2e .GenerateSeriesWithSamples ("test_series_b" , start , scrapeInterval , i * numSamples , numSamples , prompbLabels ... )
@@ -874,11 +875,12 @@ func TestProtobufCodecFuzz(t *testing.T) {
874
875
// Generate another set of series for testing binary expression and vector matching.
875
876
for i := numSeries ; i < 2 * numSeries ; i ++ {
876
877
prompbLabels := []prompb.Label {{Name : "job" , Value : "test" }, {Name : "series" , Value : strconv .Itoa (i )}}
877
- if i % 3 == 0 {
878
+ switch i % 3 {
879
+ case 0 :
878
880
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "200" })
879
- } else if i % 3 == 1 {
881
+ case 1 :
880
882
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "400" })
881
- } else {
883
+ default :
882
884
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "500" })
883
885
}
884
886
series := e2e .GenerateSeriesWithSamples ("test_series_b" , start , scrapeInterval , i * numSamples , numSamples , prompbLabels ... )
@@ -1532,11 +1534,12 @@ func TestBackwardCompatibilityQueryFuzz(t *testing.T) {
1532
1534
// Generate another set of series for testing binary expression and vector matching.
1533
1535
for i := numSeries ; i < 2 * numSeries ; i ++ {
1534
1536
prompbLabels := []prompb.Label {{Name : "job" , Value : "test" }, {Name : "series" , Value : strconv .Itoa (i )}}
1535
- if i % 3 == 0 {
1537
+ switch i % 3 {
1538
+ case 0 :
1536
1539
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "200" })
1537
- } else if i % 3 == 1 {
1540
+ case 1 :
1538
1541
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "400" })
1539
- } else {
1542
+ default :
1540
1543
prompbLabels = append (prompbLabels , prompb.Label {Name : "status_code" , Value : "500" })
1541
1544
}
1542
1545
series := e2e .GenerateSeriesWithSamples ("test_series_b" , start , scrapeInterval , i * numSamples , numSamples , prompbLabels ... )
0 commit comments