forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another attempt to stabilize (and limit) integration tests (apache#39913
) There is no particular reason we should run the integration tests for both Postgres and mysql - and Postgres ones seem to be much more stable in general, so we only limit the tests to be run the tests for Postgres. Also - since the tests (especially mssql) seem to be flaky, we re-run them once if they fail
- Loading branch information
Showing
4 changed files
with
64 additions
and
16 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
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,53 @@ | ||
#!/usr/bin/env bash | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you 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. | ||
|
||
export COLOR_RED=$'\e[31m' | ||
export COLOR_YELLOW=$'\e[33m' | ||
export COLOR_RESET=$'\e[0m' | ||
|
||
if [[ ! "$#" -eq 1 ]]; then | ||
echo "${COLOR_RED}You must provide exactly one argument!.${COLOR_RESET}" | ||
exit 1 | ||
fi | ||
|
||
INTEGRATION=${1} | ||
|
||
breeze down | ||
set +e | ||
breeze testing integration-tests --integration "${INTEGRATION}" | ||
RESULT=$? | ||
set -e | ||
if [[ ${RESULT} != "0" ]]; then | ||
echo | ||
echo "${COLOR_YELLOW}Integration Tests failed. Retrying once${COLOR_RESET}" | ||
echo | ||
echo "This could be due to a flaky test, re-running once to re-check it After restarting docker." | ||
echo | ||
sudo service docker restart | ||
breeze down | ||
set +e | ||
breeze testing integration-tests --integration "${INTEGRATION}" | ||
RESULT=$? | ||
set -e | ||
if [[ ${RESULT} != "0" ]]; then | ||
echo | ||
echo "${COLOR_RED}The integration tests failed for the second time! Giving up${COLOR_RESET}" | ||
echo | ||
exit ${RESULT} | ||
fi | ||
fi |
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
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