@@ -180,7 +180,8 @@ func TestQueryBatchHasCapacity(t *testing.T) {
180180 t .Run (tt .name , func (t * testing.T ) {
181181 // Handle special edge case tests that need dynamic size calculation
182182 sizeLimit := tt .sizeLimit
183- if tt .name == "exactly at limit boundary" {
183+ switch tt .name {
184+ case "exactly at limit boundary" :
184185 // Calculate exact size needed for the new ID
185186 newIdSize := calculateIdSize (tt .newId )
186187 if newIdSize > 0 {
@@ -190,7 +191,7 @@ func TestQueryBatchHasCapacity(t *testing.T) {
190191 } else {
191192 sizeLimit = 0
192193 }
193- } else if tt . name == "one byte over limit" {
194+ case "one byte over limit" :
194195 // Calculate exact size needed for the new ID minus 1
195196 newIdSize := calculateIdSize (tt .newId )
196197 if newIdSize > 0 {
@@ -1334,14 +1335,15 @@ func TestReportBatchHasCapacity(t *testing.T) {
13341335 t .Run (tt .name , func (t * testing.T ) {
13351336 // Handle special edge case tests that need dynamic size calculation
13361337 sizeLimit := tt .sizeLimit
1337- if tt .name == "exactly at limit boundary" {
1338+ switch tt .name {
1339+ case "exactly at limit boundary" :
13381340 // Calculate exact size needed for the new report
13391341 newReportSize := calculateReportSize (tt .newReport )
13401342 // Always include tag and length overhead, even for empty messages
13411343 tagSize := varintSize (uint64 (2 << 3 | 2 ))
13421344 lengthSize := varintSize (uint64 (newReportSize ))
13431345 sizeLimit = tagSize + lengthSize + newReportSize
1344- } else if tt . name == "one byte over limit" {
1346+ case "one byte over limit" :
13451347 // Calculate exact size needed for the new report minus 1
13461348 newReportSize := calculateReportSize (tt .newReport )
13471349 // Always include tag and length overhead, even for empty messages
0 commit comments