Skip to content

Commit 44d8a9e

Browse files
authored
ci(spanner): run spanner integration tests against prod (#6888)
Execute the Spanner integration tests against prod from the `integration-daily` build. The Spanner samples/tests have cases that are skipped or short-circuited when running against the emulator, so we lost some coverage when we move to using the emulator exclusively from the "normal" builds. Now we'll at least hit those cases during `integration-daily`.
1 parent f8aa219 commit 44d8a9e

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

ci/cloudbuild/builds/integration-daily.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# `ci/cloudbuild/triggers` directory. "Manual" triggers exist only within the
2424
# GCB UI at the time of this writing. Users with the appropriate access can run
2525
# this build by hand with:
26-
# `ci/cloudbuild/build.sh --distro fedora integration-daily --project cloud-cpp-testing-resources`
26+
# `ci/cloudbuild/build.sh --distro fedora-34 integration-daily --project cloud-cpp-testing-resources`
2727

2828
set -eu
2929

@@ -44,3 +44,7 @@ export GOOGLE_CLOUD_CPP_SPANNER_SLOW_INTEGRATION_TESTS="instance,backup"
4444
export GOOGLE_CLOUD_CPP_IAM_QUOTA_LIMITED_INTEGRATION_TESTS="yes"
4545
mapfile -t integration_args < <(integration::bazel_args)
4646
integration::bazel_with_emulators test "${args[@]}" "${integration_args[@]}"
47+
48+
io::log_h2 "Running Spanner integration tests (against prod)"
49+
bazel test "${args[@]}" "${integration_args[@]}" \
50+
--test_tag_filters="integration-test" google/cloud/spanner/...

ci/cloudbuild/builds/lib/integration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ curl -sSL --retry 10 -o /dev/shm/roots.pem https://pki.google.com/roots.pem
4141
#
4242
# mapfile -t args < <(bazel::common_args)
4343
# mapfile -t integration_args < <(integration::bazel_args)
44-
# integration::bazel_with_emulators test "${args[@]}" "${integration_args}"
44+
# integration::bazel_with_emulators test "${args[@]}" "${integration_args[@]}"
4545
#
4646
function integration::bazel_args() {
4747
declare -a args
@@ -134,7 +134,7 @@ function integration::bazel_args() {
134134
#
135135
# mapfile -t args < <(bazel::common_args)
136136
# mapfile -t integration_args < <(integration::bazel_args)
137-
# integration::bazel_with_emulators test "${args[@]}" "${integration_args}"
137+
# integration::bazel_with_emulators test "${args[@]}" "${integration_args[@]}"
138138
#
139139
function integration::bazel_with_emulators() {
140140
readonly EMULATOR_SCRIPT="run_integration_tests_emulator_bazel.sh"

google/cloud/spanner/testing/policies.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ namespace google {
2525
namespace cloud {
2626
namespace spanner_testing {
2727
inline namespace SPANNER_CLIENT_NS {
28-
// For some tests, use 15 minutes as the maximum polling and retry periods. The
29-
// default is longer, but we need to timeout earlier in the CI builds.
30-
auto constexpr kMaximumWaitTimeMinutes = 15;
28+
29+
auto constexpr kMaximumWaitTimeMinutes = 30; // test timeout notwithstanding
3130
auto constexpr kBackoffScaling = 2.0;
3231

3332
inline std::unique_ptr<spanner::RetryPolicy> TestRetryPolicy() {

0 commit comments

Comments
 (0)