World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#589] test: add more test failure infomation if test failed. (#859)
FANNG1c8ea4791340
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 585b198064..5ae89bc2a1 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -41,6 +41,14 @@ jobs:- name: Build with Gradlerun: gradle build -PskipITs+ - name: Upload unit tests report+ uses: actions/upload-artifact@v3+ if: failure()+ with:+ name: unit test report+ path:+ build/reports+- name: Jacoco Report to PRid: jacocouses: madrapps/[email protected]diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.ymlindex cd6e206e2d..5eedaa6301 100644--- a/.github/workflows/integration-test.yml+++ b/.github/workflows/integration-test.yml@@ -61,7 +61,7 @@ jobs:- name: Package Gravitinorun: |gradle build -x test- gradle compileDistribution+ gradle compileDistribution -x test- name: Check docker container statususes: nick-fields/retry@v2@@ -89,18 +89,16 @@ jobs:gradle test --rerun-tasks -PskipTests -PtestMode=embeddedgradle test --rerun-tasks -PskipTests -PtestMode=deploy- - name: Print logs when Gravitino integration tests failure+ - name: Upload integrate tests reports+ uses: actions/upload-artifact@v3if: ${{ failure() && steps.integrationTest.outcome == 'failure' }}- run: |- if [ -f "integration-test/build/integration-test.log" ]; then- cat integration-test/build/integration-test.log- fi- if [ -f "distribution/package/logs/gravitino-server.out" ]; then- cat distribution/package/logs/gravitino-server.out- fi- if [ -f "distribution/package/logs/gravitino-server.log" ]; then- cat distribution/package/logs/gravitino-server.log- fi+ with:+ name: integrate test reports+ path: |+ build/reports+ integration-test/build/integration-test.log+ distribution/package/logs/gravitino-server.out+ distribution/package/logs/gravitino-server.log- name: Stop and remove containerrun: |diff --git a/build.gradle.kts b/build.gradle.ktsindex 629ac157ee..49b5f7c3d9 100644--- a/build.gradle.kts+++ b/build.gradle.kts@@ -13,6 +13,7 @@ import com.github.jk1.license.render.ReportRendererimport com.github.jk1.license.render.InventoryHtmlReportRendererimport com.github.jk1.license.filter.DependencyFilterimport com.github.jk1.license.filter.LicenseBundleNormalizer+import org.gradle.api.tasks.testing.logging.TestExceptionFormatplugins {`maven-publish`@@ -139,6 +140,13 @@ subprojects {}tasks.configureEach<Test> {+ testLogging {+ exceptionFormat = TestExceptionFormat.FULL+ showExceptions = true+ showCauses = true+ showStackTraces = true+ }+ reports.html.outputLocation.set(file("${rootProject.projectDir}/build/reports/"))val skipTests = project.hasProperty("skipTests")if (!skipTests) {if (project.name == "trino-connector") {diff --git a/docs/assets/test-fail-job.png b/docs/assets/test-fail-job.pngnew file mode 100644index 0000000000..29ef4bfd5dBinary files /dev/null and b/docs/assets/test-fail-job.png differdiff --git a/docs/assets/test-fail-pr.png b/docs/assets/test-fail-pr.pngnew file mode 100644index 0000000000..f1e77e12f7Binary files /dev/null and b/docs/assets/test-fail-pr.png differdiff --git a/docs/assets/test-fail-summary.png b/docs/assets/test-fail-summary.pngnew file mode 100644index 0000000000..e6a48e1dffBinary files /dev/null and b/docs/assets/test-fail-summary.png differdiff --git a/docs/integration-test.md b/docs/integration-test.mdindex 4dcca41cd2..e3bb8789cd 100644--- a/docs/integration-test.md+++ b/docs/integration-test.md@@ -136,3 +136,21 @@ You have two modes to debug the Gravitino server and integration tests: `embedde- The Gravitino project is compiled and packaged in the `distribution` directory using the `./gradlew compileDistribution` command.- Execution the `./gradlew test -PtestMode=[embedded|deploy]` command.- Stop the Docker image to clean up.++## Test Failure+If a test fails, valuable information can be retrieved from the logs and test report. Test reports+are stored in the `./build/reports` directory. The integration test logs are situated in the+`./integrate-test/build` directory. In deploy mode, Gravitino server logs can be found at+`./distribution/package/logs/` directory. In the event of a test failure within the GitHub workflow,+both logs and the test report are archived. To obtain the archive, please follow these steps:+1. Click the `detail` link associated with the failed integrate test in the pull request (PR). This will redirect you to the job page.++ ++2. On the job page, locate the `Summary` button on the left-hand side and click it to access the workflow summary page.++ ++3. Look for the Artifacts item on the summary page and download the archive from there.++ 