-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(fix): add conformance test to the CI pipeline (redo of PR#1698). (…
- Loading branch information
1 parent
4e979cb
commit e02b5b8
Showing
3 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# Github action job to test core java library features on | ||
# downstream client libraries before they are released. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
name: conformance | ||
jobs: | ||
conformance: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: googleapis/cloud-bigtable-clients-test | ||
ref: main | ||
path: cloud-bigtable-clients-test | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 8 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '>=1.20.2' | ||
- run: java -version | ||
- run: go version | ||
- run: .kokoro/conformance.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -eo pipefail | ||
|
||
## Get the directory of the build script | ||
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) | ||
## cd to the parent directory, i.e. the root of the git repo | ||
cd ${scriptDir}/.. | ||
|
||
# include common functions | ||
source ${scriptDir}/common.sh | ||
|
||
# Print out Maven & Java version | ||
mvn -version | ||
echo ${JOB_TYPE} | ||
|
||
# attempt to install 3 times with exponential backoff (starting with 10 seconds) | ||
retry_with_backoff 3 10 \ | ||
mvn install -B -V -ntp \ | ||
-DskipTests=true \ | ||
-Dclirr.skip=true \ | ||
-Denforcer.skip=true \ | ||
-Dmaven.javadoc.skip=true \ | ||
-Dgcloud.download.skip=true \ | ||
-T 1C | ||
|
||
RETURN_CODE=0 | ||
set +e | ||
|
||
# Build and start the proxy in a separate process | ||
pushd . | ||
cd test-proxy | ||
mvn clean install -DskipTests | ||
nohup java -Dport=9999 -jar target/google-cloud-bigtable-test-proxy-0.0.1-SNAPSHOT.jar & | ||
proxyPID=$! | ||
popd | ||
|
||
# Run the conformance test | ||
pushd . | ||
cd cloud-bigtable-clients-test/tests | ||
eval "go test -v -skip `cat ../../test-proxy/known_failures.txt` -proxy_addr=:9999" | ||
RETURN_CODE=$? | ||
popd | ||
|
||
# Stop the proxy | ||
kill $proxyPID | ||
|
||
# fix output location of logs | ||
bash .kokoro/coerce_logs.sh | ||
|
||
echo "exiting with ${RETURN_CODE}" | ||
exit ${RETURN_CODE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TestMutateRow_Generic_DeadlineExceeded\|TestMutateRows_Retry_ExponentialBackoff\|TestSampleRowKeys_Generic_DeadlineExceeded |