Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testing] Fix e2e tests timed out, but there's empty test log #2810

Merged
merged 6 commits into from
Jan 10, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions test/api-integration-test/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ cd "${BASE_DIR}/${TEST_DIR}"
export GO111MODULE=on

echo "Run integration test..."
TEST_RESULT=`go test -v ./... -namespace ${NAMESPACE} -args -runIntegrationTests=true 2>&1`
TEST_EXIT_CODE=$?
LOG_FILE=$(mktemp)
TEST_EXIT_CODE=0 # reference for how to save exit code: https://stackoverflow.com/a/18622662
go test -v ./... -namespace ${NAMESPACE} -args -runIntegrationTests=true |& tee $LOG_FILE || TEST_EXIT_CODE=$?
Bobgy marked this conversation as resolved.
Show resolved Hide resolved

# Log the test result
printf '%s\n' "$TEST_RESULT"
# Convert test result to junit.xml
printf '%s\n' "$TEST_RESULT" | go-junit-report > ${JUNIT_TEST_RESULT}
cat $LOG_FILE | go-junit-report > ${JUNIT_TEST_RESULT}

echo "Copy test result to GCS ${RESULTS_GCS_DIR}/${JUNIT_TEST_RESULT}"
gsutil cp ${JUNIT_TEST_RESULT} ${RESULTS_GCS_DIR}/${JUNIT_TEST_RESULT}
Expand Down
9 changes: 4 additions & 5 deletions test/initialization-test/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ cd "${BASE_DIR}/${TEST_DIR}"
export GO111MODULE=on

echo "Run Initialization test..."
TEST_RESULT=`go test -v ./... -namespace ${NAMESPACE} -args -runIntegrationTests=true 2>&1`
TEST_EXIT_CODE=$?
LOG_FILE=$(mktemp)
TEST_EXIT_CODE=0 # reference for how to save exit code: https://stackoverflow.com/a/18622662
go test -v ./... -namespace ${NAMESPACE} -args -runIntegrationTests=true |& tee $LOG_FILE || TEST_EXIT_CODE=$?

# Log the test result
printf '%s\n' "$TEST_RESULT"
# Convert test result to junit.xml
printf '%s\n' "$TEST_RESULT" | go-junit-report > ${JUNIT_TEST_RESULT}
cat $LOG_FILE | go-junit-report > ${JUNIT_TEST_RESULT}
Bobgy marked this conversation as resolved.
Show resolved Hide resolved

echo "Copy test result to GCS ${RESULTS_GCS_DIR}/${JUNIT_TEST_RESULT}"
gsutil cp ${JUNIT_TEST_RESULT} ${RESULTS_GCS_DIR}/${JUNIT_TEST_RESULT}
Expand Down
2 changes: 1 addition & 1 deletion test/presubmit-tests-with-pipeline-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ usage()
PLATFORM=gcp
PROJECT=ml-pipeline-test
TEST_RESULT_BUCKET=ml-pipeline-test
TIMEOUT_SECONDS=1800
TIMEOUT_SECONDS=1800 # 30 minutes
NAMESPACE=kubeflow
ENABLE_WORKLOAD_IDENTITY=true

Expand Down