summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshollyman <shollyman@google.com>2021-11-04 15:30:13 -0700
committerGitHub <noreply@github.com>2021-11-04 22:30:13 +0000
commitbbf4d043bec1bd514f841d7adffcf9d6b8e393de (patch)
tree8b9c6bcf0c059e5c97193c4a47023e8c78fe2a34
parent83b941c0983e44fdd18ceee8c6f3e91219d72ad1 (diff)
downloadgoogle-cloud-go-bbf4d043bec1bd514f841d7adffcf9d6b8e393de.tar.gz
chore(bigquery): relax BI Engine Statistics test (#5084)
Test had an expectation on BI Engine statistics presence, however test environments don't have BI resources provisioned. Relax the test. Fixes: https://github.com/googleapis/google-cloud-go/issues/5083
-rw-r--r--bigquery/integration_test.go20
1 files changed, 9 insertions, 11 deletions
diff --git a/bigquery/integration_test.go b/bigquery/integration_test.go
index aaf786541..766c56639 100644
--- a/bigquery/integration_test.go
+++ b/bigquery/integration_test.go
@@ -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)
}
}