Skip to content

Commit a8edb79

Browse files
authored
test(serverless-spark): run tests sequentially for CI (googleapis#2603)
Running tests in parallel consumes more GCE CPU quota, and we're occasionally getting flakes due to exceeding the default. This still may be the right tradeoff for speed of interactive development, but these aren't (yet) the slowest integration tests, so running sequentially will preserve quota without increasing CI walltime. ## Description > Should include a concise description of the changes (bug or feature), it's > impact, along with a summary of the solution ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here>
1 parent 99b2a83 commit a8edb79

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.ci/integration.cloudbuild.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,7 @@ steps:
968968
- "SERVERLESS_SPARK_LOCATION=$_REGION"
969969
- "SERVERLESS_SPARK_PROJECT=$PROJECT_ID"
970970
- "SERVERLESS_SPARK_SERVICE_ACCOUNT=$SERVICE_ACCOUNT_EMAIL"
971+
- "EXTRA_TEST_ARGS=-test.parallel=1"
971972
secretEnv: ["CLIENT_ID"]
972973
volumes:
973974
- name: "go"

.ci/test_with_coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ for tool_name in "${TOOL_PACKAGE_NAMES[@]}"; do
3535
done
3636

3737
# Run integration test
38-
if ! ./"${TEST_BINARY}" -test.v -test.coverprofile="${COVERAGE_FILE}"; then
38+
if ! ./"${TEST_BINARY}" -test.v ${EXTRA_TEST_ARGS:-} -test.coverprofile="${COVERAGE_FILE}"; then
3939
echo "Error: Tests for ${DISPLAY_NAME} failed. Exiting."
4040
exit 1
4141
fi

0 commit comments

Comments
 (0)