Skip to content

Commit

Permalink
remove integration-test module
Browse files Browse the repository at this point in the history
  • Loading branch information
mchades committed Aug 22, 2024
1 parent 92b8348 commit 5635159
Show file tree
Hide file tree
Showing 387 changed files with 462 additions and 242 deletions.
1 change: 1 addition & 0 deletions .github/workflows/backend-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ jobs:
-x :web:test -x :clients:client-python:test -x :flink-connector:test -x :spark-connector:test -x :spark-connector:spark-common:test
-x :spark-connector:spark-3.3:test -x :spark-connector:spark-3.4:test -x :spark-connector:spark-3.5:test
-x :spark-connector:spark-runtime-3.3:test -x :spark-connector:spark-runtime-3.4:test -x :spark-connector:spark-runtime-3.5:test
-x :web:integration-test:test -x :trino-connector:integration-test:test -x :trino-connector:test
- name: Upload integrate tests reports
uses: actions/upload-artifact@v3
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/frontend-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ jobs:
- name: Frontend Integration Test
id: integrationTest
run: |
./gradlew -PskipTests -PtestMode=embedded -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false :integration-test:test --tests "org.apache.gravitino.integration.test.web.ui.**"
./gradlew -PskipTests -PtestMode=deploy -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false :integration-test:test --tests "org.apache.gravitino.integration.test.web.ui.**"
./gradlew -PskipTests -PtestMode=embedded -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false :web:integration-test:test --tests "org.apache.gravitino.integration.test.web.ui.**"
./gradlew -PskipTests -PtestMode=deploy -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false :web:integration-test:test --tests "org.apache.gravitino.integration.test.web.ui.**"
- name: Upload integrate tests reports
uses: actions/upload-artifact@v3
Expand All @@ -99,9 +99,10 @@ jobs:
name: integrate-test-reports-${{ matrix.java-version }}
path: |
build/reports
integration-test/build/integration-test-integration-test.log
integration-test/build/*.tar
integration-test-common/build/integration-test-integration-test.log
integration-test-common/build/*.tar
distribution/package/logs/gravitino-server.out
distribution/package/logs/gravitino-server.log
catalogs/**/*.log
catalogs/**/*.tar
catalogs/**/*.tar
web/integration-test/build/*.log
104 changes: 104 additions & 0 deletions .github/workflows/trino-integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Trino Integration Test

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main", "branch-*" ]
pull_request:
branches: [ "main", "branch-*" ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
source_changes:
- .github/**
- api/**
- bin/**
- catalogs/**
- clients/client-java/**
- clients/client-java-runtime/**
- clients/filesystem-hadoop3/**
- clients/filesystem-hadoop3-runtime/**
- common/**
- conf/**
- core/**
- dev/**
- gradle/**
- meta/**
- server/**
- server-common/**
- trino-connector/**
- docs/open-api/**
- build.gradle.kts
- gradle.properties
- gradlew
- setting.gradle.kts
outputs:
source_changes: ${{ steps.filter.outputs.source_changes }}

# Integration test for AMD64 architecture
test-amd64-arch:
needs: changes
if: needs.changes.outputs.source_changes == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
architecture: [linux/amd64]
java-version: [ 17 ]
env:
PLATFORM: ${{ matrix.architecture }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: 'gradle'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Check required command
run: |
dev/ci/check_commands.sh
- name: Package Gravitino
run: |
./gradlew compileDistribution -x test -PjdkVersion=${{ matrix.java-version }}
- name: Free up disk space
run: |
dev/ci/util_free_space.sh
- name: Trino Integration Test
id: integrationTest
run: |
./gradlew -PskipTests -PtestMode=embedded -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false :trino-connector:integration-test:test
./gradlew -PskipTests -PtestMode=deploy -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false :trino-connector:integration-test:test
- name: Upload integrate tests reports
uses: actions/upload-artifact@v3
if: ${{ (failure() && steps.integrationTest.outcome == 'failure') || contains(github.event.pull_request.labels.*.name, 'upload log') }}
with:
name: trino-connector-integrate-test-reports-${{ matrix.java-version }}
path: |
build/reports
trino-connector/integrate-test/build/*.log
trino-connector/integrate-test/build/*.tar
distribution/package/logs/gravitino-server.out
distribution/package/logs/gravitino-server.log
catalogs/**/*.log
catalogs/**/*.tar
27 changes: 26 additions & 1 deletion clients/client-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,22 @@ dependencies {
testCompileOnly(libs.lombok)
testAnnotationProcessor(libs.lombok)

testImplementation(project(":core"))
testImplementation(project(":integration-test-common", "testArtifacts"))
testImplementation(project(":server"))
testImplementation(project(":server-common"))

testImplementation(libs.bundles.jersey)
testImplementation(libs.bundles.jwt)
testImplementation(libs.commons.lang3)
testImplementation(libs.hadoop3.client)
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.params)
testImplementation(libs.minikdc)
testImplementation(libs.mockito.core)
testImplementation(libs.mockserver.netty)
testImplementation(libs.mockserver.client.java)
testImplementation(libs.bundles.jwt)
testImplementation(libs.testcontainers)

testRuntimeOnly(libs.junit.jupiter.engine)
}
Expand All @@ -56,6 +66,16 @@ tasks.build {
dependsOn("javadoc")
}

tasks.test {
val skipITs = project.hasProperty("skipITs")
if (skipITs) {
exclude("**/integration/test/**")
} else {
dependsOn(":catalogs:catalog-hive:jar", ":catalogs:catalog-hive:runtimeJars")
dependsOn(":catalogs:catalog-kafka:jar", ":catalogs:catalog-kafka:runtimeJars")
}
}

tasks.javadoc {
dependsOn(":api:javadoc", ":common:javadoc")
source =
Expand All @@ -67,3 +87,8 @@ tasks.javadoc {
project(":api").configurations["runtimeClasspath"] +
project(":common").configurations["runtimeClasspath"]
}

tasks.clean {
delete("target")
delete("tmp")
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.gravitino.integration.test.client;
package org.apache.gravitino.client.integration.test;

import com.google.common.collect.Maps;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
* under the License.
*/

package org.apache.gravitino.integration.test.client;
package org.apache.gravitino.client.integration.test;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import java.io.File;
import java.util.Collections;
import java.util.Map;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.gravitino.Catalog;
import org.apache.gravitino.client.GravitinoMetalake;
import org.apache.gravitino.integration.test.container.ContainerSuite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.integration.test.client;
package org.apache.gravitino.client.integration.test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.integration.test;
package org.apache.gravitino.client.integration.test;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Sets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.integration.test.web.rest;
package org.apache.gravitino.client.integration.test;

import org.apache.gravitino.client.GravitinoVersion;
import org.apache.gravitino.integration.test.util.AbstractIT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.integration.test.authorization;
package org.apache.gravitino.client.integration.test.authorization;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.gravitino.integration.test.web.rest;
package org.apache.gravitino.client.integration.test.authorization;

import static org.apache.gravitino.server.authentication.KerberosConfig.KEYTAB;
import static org.apache.gravitino.server.authentication.KerberosConfig.PRINCIPAL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.integration.test.web.rest;
package org.apache.gravitino.client.integration.test.authorization;

import static org.apache.gravitino.server.GravitinoServer.WEBSERVER_CONF_PREFIX;
import static org.apache.gravitino.server.authentication.KerberosConfig.KEYTAB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.integration.test.web.rest;
package org.apache.gravitino.client.integration.test.authorization;

import com.google.common.collect.Maps;
import io.jsonwebtoken.Jwts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.integration.test.authorization;
package org.apache.gravitino.client.integration.test.authorization;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
Expand Down
36 changes: 0 additions & 36 deletions clients/client-java/src/test/java/resources/log4j2.properties

This file was deleted.

1 change: 1 addition & 0 deletions clients/filesystem-hadoop3-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ plugins {

dependencies {
implementation(project(":clients:filesystem-hadoop3"))
implementation(project(":clients:client-java-runtime", configuration = "shadow"))
}

tasks.withType<ShadowJar>(ShadowJar::class.java) {
Expand Down
34 changes: 31 additions & 3 deletions clients/filesystem-hadoop3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,30 @@ plugins {
}

dependencies {
compileOnly(libs.hadoop3.common)
implementation(project(":clients:client-java-runtime", configuration = "shadow"))
compileOnly(project(":clients:client-java-runtime", configuration = "shadow"))
implementation(libs.hadoop3.common)
implementation(libs.caffeine)

testImplementation(project(":api"))
testImplementation(project(":core"))
testImplementation(project(":common"))
testImplementation(project(":server"))
testImplementation(project(":server-common"))
testImplementation(project(":clients:client-java"))
testImplementation(project(":integration-test-common", "testArtifacts"))
testImplementation(libs.awaitility)
testImplementation(libs.bundles.jetty)
testImplementation(libs.bundles.jersey)
testImplementation(libs.bundles.jwt)
testImplementation(libs.hadoop3.common)
testImplementation(libs.testcontainers)
testImplementation(libs.guava)
testImplementation(libs.hadoop3.common) {
exclude("com.sun.jersey", "jersey-core")
exclude("com.sun.jersey", "jersey-servlet")
exclude("com.sun.jersey", "jersey-json")
exclude("com.sun.jersey", "jersey-server")
}
testImplementation(libs.httpclient5)
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.params)
testImplementation(libs.minikdc)
Expand All @@ -47,8 +62,21 @@ tasks.build {
dependsOn("javadoc")
}

tasks.test {
val skipITs = project.hasProperty("skipITs")
if (skipITs) {
exclude("**/integration/test/**")
} else {
dependsOn(":catalogs:catalog-hadoop:jar", ":catalogs:catalog-hadoop:runtimeJars")
}
}

tasks.javadoc {
dependsOn(":clients:client-java-runtime:javadoc")
source = sourceSets["main"].allJava +
project(":clients:client-java-runtime").sourceSets["main"].allJava
}

tasks.clean {
delete("target")
}
Loading

0 comments on commit 5635159

Please sign in to comment.