Skip to content

Commit

Permalink
chore(bigquery): relax BI Engine Statistics test (#5084)
Browse files Browse the repository at this point in the history
Test had an expectation on BI Engine statistics presence, however
test environments don't have BI resources provisioned.  Relax the
test.

Fixes: #5083
  • Loading branch information
shollyman committed Nov 4, 2021
1 parent 83b941c commit bbf4d04
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions bigquery/integration_test.go
Expand Up @@ -2016,18 +2016,16 @@ func TestIntegration_QueryStatistics(t *testing.T) {
t.Error("expected query timeline, none present")
}

if qStats.BIEngineStatistics == nil {
t.Error("expected BIEngine statistics, none present")
}

expectedMode := true
for _, m := range []string{"FULL", "PARTIAL", "DISABLED"} {
if qStats.BIEngineStatistics.BIEngineMode == m {
expectedMode = true
if qStats.BIEngineStatistics != nil {
expectedMode := false
for _, m := range []string{"FULL", "PARTIAL", "DISABLED"} {
if qStats.BIEngineStatistics.BIEngineMode == m {
expectedMode = true
}
}
if !expectedMode {
t.Errorf("unexpected BIEngineMode for BI Engine statistics, got %s", qStats.BIEngineStatistics.BIEngineMode)
}
}
if !expectedMode {
t.Errorf("unexpected BIEngineMode for BI Engine statistics, got %s", qStats.BIEngineStatistics.BIEngineMode)
}
}

Expand Down

0 comments on commit bbf4d04

Please sign in to comment.