diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 086fc01298ca..4f59ef82bade 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,44 +50,6 @@ concurrency: cancel-in-progress: true jobs: - maven-checks: - runs-on: ubuntu-latest - name: maven-checks ${{ matrix.java-version }} - strategy: - fail-fast: false - matrix: - include: - - { java-version: 23, cache: 'true', cleanup-node: true } - - { java-version: 24-ea, cache: 'restore', cleanup-node: true } - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # checkout all commits, as the build result depends on `git describe` equivalent - ref: | - ${{ github.event_name == 'repository_dispatch' && - github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha && - format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }} - - uses: ./.github/actions/setup - timeout-minutes: 10 - with: - cache: ${{ matrix.cache }} - java-version: ${{ matrix.java-version }} - cleanup-node: true - - name: Check SPI backward compatibility - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $MAVEN clean install ${MAVEN_FAST_INSTALL} -pl :trino-spi -am - $MAVEN clean verify -B --strict-checksums -DskipTests -pl :trino-spi - - name: Maven Checks - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $MAVEN clean verify -B --strict-checksums -V -T 1C -DskipTests -P ci -pl '!:trino-server-rpm' - - name: Remove Trino from local Maven repo to avoid caching it - # Avoid caching artifacts built in this job, cache should only include dependencies - if: steps.cache.outputs.cache-hit != 'true' && matrix.cache == 'true' - run: rm -rf ~/.m2/repository/io/trino/trino-* - artifact-checks: runs-on: ubuntu-latest timeout-minutes: 45 @@ -177,72 +139,6 @@ jobs: with: base_ref: ${{ github.event.pull_request.base.ref }} - error-prone-checks: - runs-on: ubuntu-latest - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB - ref: | - ${{ github.event_name == 'repository_dispatch' && - github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha && - format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }} - - uses: ./.github/actions/setup - timeout-minutes: 10 - with: - cache: restore - - name: Maven Install - run: | - # build everything to make sure dependencies of impacted modules are present - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $MAVEN clean install ${MAVEN_FAST_INSTALL} ${MAVEN_GIB} -pl '!:trino-docs,!:trino-server,!:trino-server-rpm' - - name: Error Prone Checks - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - # Skip checks, these are run in `maven-checks` job and e.g. checkstyle is expensive. - $MAVEN ${MAVEN_TEST} -T 1C clean compile test-compile -DskipTests -Dair.check.skip-all=true ${MAVEN_GIB} -Dgib.buildUpstream=never -P errorprone-compiler \ - -pl '!:trino-docs,!:trino-server,!:trino-server-rpm' - - test-jdbc-compatibility: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # checkout tags so version in Manifest is set properly - ref: | - ${{ github.event_name == 'repository_dispatch' && - github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha && - format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }} - - uses: ./.github/actions/setup - timeout-minutes: 10 - with: - cache: restore - - name: Maven Install - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $MAVEN clean install ${MAVEN_FAST_INSTALL} ${MAVEN_GIB} -Dgib.logImpactedTo=gib-impacted.log -pl '!:trino-docs,!:trino-server,!:trino-server-rpm' - - name: Test old JDBC vs current server - id: tests-old - run: | - if [ ! -f gib-impacted.log ] || grep -q testing/trino-test-jdbc-compatibility-old-driver gib-impacted.log; then - testing/trino-test-jdbc-compatibility-old-driver/bin/run_tests.sh - fi - - name: Test current JDBC vs old server - id: tests-current - if: always() - run: | - if [ ! -f gib-impacted.log ] || grep -q testing/trino-test-jdbc-compatibility-old-server gib-impacted.log; then - $MAVEN test ${MAVEN_TEST} -pl :trino-test-jdbc-compatibility-old-server - fi - - name: Upload test results - uses: ./.github/actions/process-test-results - if: always() - with: - has-failed-tests: ${{ steps.tests-old.outcome == 'failure' || steps.tests-current.outcome == 'failure' }} - upload-heap-dump: ${{ env.SECRETS_PRESENT == '' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }} - hive-tests: runs-on: ubuntu-latest strategy: @@ -309,87 +205,6 @@ jobs: conclusion: ${{ job.status }} github_token: ${{ secrets.GITHUB_TOKEN }} - test-other-modules: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # checkout all commits to be able to determine merge base for GIB - ref: | - ${{ github.event_name == 'repository_dispatch' && - github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha && - format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }} - - uses: ./.github/actions/setup - timeout-minutes: 10 - with: - cache: restore - cleanup-node: true - - name: Maven Install - run: | - export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" - $MAVEN clean install ${MAVEN_FAST_INSTALL} ${MAVEN_GIB} -pl '!:trino-docs,!:trino-server,!:trino-server-rpm' - - name: Maven Tests - id: tests - run: | - $MAVEN test ${MAVEN_TEST} -pl ' - !:trino-base-jdbc, - !:trino-bigquery, - !:trino-cassandra, - !:trino-clickhouse, - !:trino-delta-lake, - !:trino-docs, - !:trino-druid, - !:trino-elasticsearch, - !:trino-exasol, - !:trino-faulttolerant-tests, - !:trino-filesystem, - !:trino-filesystem-alluxio, - !:trino-filesystem-cache-alluxio, - !:trino-filesystem-azure, - !:trino-filesystem-gcs, - !:trino-filesystem-manager, - !:trino-filesystem-s3, - !:trino-google-sheets, - !:trino-hdfs, - !:trino-hive, - !:trino-hudi, - !:trino-iceberg, - !:trino-ignite, - !:trino-jdbc, - !:trino-kafka, - !:trino-kudu, - !:trino-main, - !:trino-mariadb, - !:trino-memory, - !:trino-mongodb, - !:trino-mysql, - !:trino-opensearch, - !:trino-oracle, - !:trino-orc, - !:trino-parquet, - !:trino-phoenix5, - !:trino-pinot, - !:trino-postgresql, - !:trino-redis, - !:trino-redshift, - !:trino-resource-group-managers, - !:trino-server, - !:trino-server-rpm, - !:trino-singlestore, - !:trino-snowflake, - !:trino-sqlserver, - !:trino-test-jdbc-compatibility-old-server, - !:trino-tests, - !:trino-thrift, - !:trino-vertica' - - name: Upload test results - uses: ./.github/actions/process-test-results - if: always() - with: - has-failed-tests: ${{ steps.tests.outcome == 'failure' }} - upload-heap-dump: ${{ env.SECRETS_PRESENT == '' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }} - build-test-matrix: runs-on: ubuntu-latest outputs: @@ -431,69 +246,15 @@ jobs: - plugin/trino-base-jdbc - plugin/trino-memory - plugin/trino-thrift - - modules: - - lib/trino-orc - - lib/trino-parquet - - modules: - - lib/trino-filesystem - - lib/trino-filesystem-azure - - lib/trino-filesystem-alluxio - - lib/trino-filesystem-cache-alluxio - - lib/trino-filesystem-gcs - - lib/trino-filesystem-manager - - lib/trino-filesystem-s3 - - lib/trino-hdfs - - { modules: core/trino-main } - - { modules: lib/trino-filesystem-azure, profile: cloud-tests } - - { modules: lib/trino-filesystem-gcs, profile: cloud-tests } - - { modules: lib/trino-filesystem-s3, profile: cloud-tests } - - { modules: lib/trino-hdfs, profile: cloud-tests } - - { modules: plugin/trino-bigquery } - - { modules: plugin/trino-bigquery, profile: cloud-tests-2 } - - { modules: plugin/trino-cassandra } - - { modules: plugin/trino-clickhouse } - - { modules: plugin/trino-delta-lake } - - { modules: plugin/trino-delta-lake, profile: cloud-tests } - - { modules: plugin/trino-delta-lake, profile: fte-tests } - - { modules: plugin/trino-druid } - - { modules: plugin/trino-elasticsearch } - - { modules: plugin/trino-exasol } - - { modules: plugin/trino-google-sheets } - - { modules: plugin/trino-hive } - - { modules: plugin/trino-hive, profile: fte-tests } - - { modules: plugin/trino-hive, profile: test-parquet } - - { modules: plugin/trino-hudi } - - { modules: plugin/trino-iceberg } - - { modules: plugin/trino-iceberg, profile: cloud-tests } - - { modules: plugin/trino-iceberg, profile: fte-tests } - - { modules: plugin/trino-iceberg, profile: minio-and-avro } - - { modules: plugin/trino-ignite } - - { modules: plugin/trino-kafka } - - { modules: plugin/trino-kudu } - - { modules: plugin/trino-mariadb } - - { modules: plugin/trino-mongodb } - - { modules: plugin/trino-mysql } - - { modules: plugin/trino-openlineage } - - { modules: plugin/trino-opensearch } - { modules: plugin/trino-oracle } - - { modules: plugin/trino-phoenix5 } - - { modules: plugin/trino-pinot } - - { modules: plugin/trino-postgresql } - - { modules: plugin/trino-redis } - - { modules: plugin/trino-redshift } - - { modules: plugin/trino-redshift, profile: cloud-tests } - - { modules: plugin/trino-redshift, profile: fte-tests } - - { modules: plugin/trino-resource-group-managers } - - { modules: plugin/trino-singlestore } - - { modules: plugin/trino-snowflake } - - { modules: plugin/trino-snowflake, profile: cloud-tests } - - { modules: plugin/trino-sqlserver } - - { modules: plugin/trino-vertica } - - { modules: testing/trino-faulttolerant-tests, profile: default } - - { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-delta } - - { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-hive } - - { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-iceberg } - - { modules: testing/trino-tests } + - { modules: plugin/trino-oracle } + - { modules: plugin/trino-oracle } + - { modules: plugin/trino-oracle } + - { modules: plugin/trino-oracle } + - { modules: plugin/trino-oracle } + - { modules: plugin/trino-oracle } + - { modules: plugin/trino-oracle } + - { modules: plugin/trino-ignite } EOF ./.github/bin/build-matrix-from-impacted.py -v -i gib-impacted.log -m .github/test-matrix.yaml -o matrix.json echo "Matrix: $(jq '.' matrix.json)" @@ -525,6 +286,7 @@ jobs: run: | export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" $MAVEN clean install ${MAVEN_FAST_INSTALL} ${MAVEN_GIB} -am -pl "${{ matrix.modules }}" + - name: Maven Tests id: tests if: >- @@ -539,7 +301,15 @@ jobs: && ! (contains(matrix.modules, 'trino-filesystem-gcs') && contains(matrix.profile, 'cloud-tests')) && ! (contains(matrix.modules, 'trino-filesystem-s3') && contains(matrix.profile, 'cloud-tests')) && ! (contains(matrix.modules, 'trino-hdfs') && contains(matrix.profile, 'cloud-tests')) - run: $MAVEN test ${MAVEN_TEST} -pl ${{ matrix.modules }} ${{ matrix.profile != '' && format('-P {0}', matrix.profile) || '' }} + run: | + if [ "${{ matrix.modules }}" == "plugin/trino-oracle" ]; then + echo "Running tests for oracle..." + $MAVEN test ${MAVEN_TEST} -Dio.airlift.log.level=WARN -pl ${{ matrix.modules }} ${{ matrix.profile != '' && format('-P {0}', matrix.profile) || '' }} > /dev/null + else + echo "Running tests for ${{ matrix.modules }}..." + $MAVEN test ${MAVEN_TEST} -pl ${{ matrix.modules }} ${{ matrix.profile != '' && format('-P {0}', matrix.profile) || '' }} + fi + # Additional tests for selected modules - name: HDFS file system cache isolated JVM tests id: tests-hdfs-isolated @@ -870,42 +640,6 @@ jobs: - default suite: - suite-1 - - suite-2 - - suite-3 - # suite-4 does not exist - - suite-5 - - suite-6-non-generic - - suite-7-non-generic - - suite-hive-transactional - - suite-azure - - suite-delta-lake-databricks104 - - suite-delta-lake-databricks113 - - suite-delta-lake-databricks122 - - suite-delta-lake-databricks133 - - suite-delta-lake-databricks143 - - suite-delta-lake-databricks154 - - suite-databricks-unity-http-hms - - suite-ranger - - suite-gcs - - suite-clients - - suite-functions - - suite-tpch - - suite-tpcds - - suite-storage-formats-detailed - - suite-parquet - - suite-oauth2 - - suite-ldap - - suite-compatibility - - suite-all-connectors-smoke - - suite-delta-lake-oss - - suite-kafka - - suite-cassandra - - suite-clickhouse - - suite-mysql - - suite-iceberg - - suite-snowflake - - suite-hudi - - suite-ignite exclude: - suite: suite-azure ignore exclusion if: >- diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java index 59e9c9d75f5e..01e73b200d46 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java @@ -1909,8 +1909,7 @@ public void testConstantUpdateWithVarcharGreaterAndLowerPredicate() public void testDeleteWithBigintEqualityPredicate() { skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = new TestTable(getQueryRunner()::execute, "test_delete_bigint", "AS SELECT * FROM region")) { + try (TestTable table = new TestTable(getQueryRunner()::execute, "test_delete_with_bigint_equality_predicate", "AS SELECT * FROM region")) { assertUpdate("DELETE FROM " + table.getName() + " WHERE regionkey = 1", 1); assertQuery( "SELECT regionkey, name FROM " + table.getName(), @@ -1926,8 +1925,7 @@ public void testDeleteWithBigintEqualityPredicate() public void testDeleteWithVarcharEqualityPredicate() { skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = new TestTable(getQueryRunner()::execute, "test_delete_varchar", "(col varchar(1))", ImmutableList.of("'a'", "'A'", "null"))) { + try (TestTable table = new TestTable(getQueryRunner()::execute, "test_delete_varchar_equality_predicate", "(col varchar(1))", ImmutableList.of("'a'", "'A'", "null"))) { if (!hasBehavior(SUPPORTS_PREDICATE_PUSHDOWN_WITH_VARCHAR_EQUALITY)) { assertQueryFails("DELETE FROM " + table.getName() + " WHERE col = 'A'", MODIFYING_ROWS_MESSAGE); return; @@ -1942,8 +1940,7 @@ public void testDeleteWithVarcharEqualityPredicate() public void testDeleteWithVarcharInequalityPredicate() { skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = createTestTableForWrites("test_delete_varchar", "(col varchar(1), pk int)", ImmutableList.of("'a', 0", "'A', 1", "null, 2"), "pk")) { + try (TestTable table = createTestTableForWrites("test_delete_with_varchar_inequality", "(col varchar(1), pk int)", ImmutableList.of("'a', 0", "'A', 1", "null, 2"), "pk")) { if (!hasBehavior(SUPPORTS_PREDICATE_PUSHDOWN_WITH_VARCHAR_INEQUALITY) && !hasBehavior(SUPPORTS_MERGE)) { assertQueryFails("DELETE FROM " + table.getName() + " WHERE col != 'A'", MODIFYING_ROWS_MESSAGE); return; @@ -1958,8 +1955,7 @@ public void testDeleteWithVarcharInequalityPredicate() public void testDeleteWithVarcharGreaterAndLowerPredicate() { skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = createTestTableForWrites("test_delete_varchar", "(col varchar(1), pk int)", ImmutableList.of("'0', 0", "'a', 1", "'A', 2", "'b', 3", "null, 4"), "pk")) { + try (TestTable table = createTestTableForWrites("test_delete_varchar_greater_lower_predicate", "(col varchar(1), pk int)", ImmutableList.of("'0', 0", "'a', 1", "'A', 2", "'b', 3", "null, 4"), "pk")) { if (!hasBehavior(SUPPORTS_PREDICATE_PUSHDOWN_WITH_VARCHAR_INEQUALITY) && !hasBehavior(SUPPORTS_MERGE)) { assertQueryFails("DELETE FROM " + table.getName() + " WHERE col < 'A'", MODIFYING_ROWS_MESSAGE); assertQueryFails("DELETE FROM " + table.getName() + " WHERE col > 'A'", MODIFYING_ROWS_MESSAGE); diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseOracleConnectorTest.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseOracleConnectorTest.java index b85473807bf6..98fd6033c731 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseOracleConnectorTest.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/BaseOracleConnectorTest.java @@ -446,7 +446,7 @@ protected void verifyConcurrentAddColumnFailurePermissible(Exception e) @Override protected OptionalInt maxSchemaNameLength() { - return OptionalInt.of(30); + return OptionalInt.of(128); } @Override @@ -458,7 +458,7 @@ protected void verifySchemaNameLengthFailurePermissible(Throwable e) @Override protected OptionalInt maxTableNameLength() { - return OptionalInt.of(30); + return OptionalInt.of(128); } @Override @@ -470,7 +470,7 @@ protected void verifyTableNameLengthFailurePermissible(Throwable e) @Override protected OptionalInt maxColumnNameLength() { - return OptionalInt.of(30); + return OptionalInt.of(128); } @Override diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestingOracleServer.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestingOracleServer.java index 8b089c5ce314..bac6cd76a92c 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestingOracleServer.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestingOracleServer.java @@ -73,11 +73,15 @@ public TestingOracleServer() private void createContainer() { - OracleContainer container = new OracleContainer("gvenzl/oracle-xe:11.2.0.2-full") + OracleContainer container = new OracleContainer("gvenzl/oracle-xe:18.4.0-slim") + .withEnv("ENABLE_ARCHIVELOG", "false") + .withEnv("DISABLE_RMAN", "true") + .withEnv("TRACE_LEVEL_CLIENT", "OFF") + .withEnv("TRACE_LEVEL_SERVER", "OFF") + .withEnv("LOGGING_LEVEL", "ERROR") .withCopyFileToContainer(MountableFile.forClasspathResource("init.sql"), "/container-entrypoint-initdb.d/01-init.sql") .withCopyFileToContainer(MountableFile.forClasspathResource("restart.sh"), "/container-entrypoint-initdb.d/02-restart.sh") - .withCopyFileToContainer(MountableFile.forHostPath(createConfigureScript()), "/container-entrypoint-initdb.d/03-create-users.sql") - .usingSid(); + .withCopyFileToContainer(MountableFile.forHostPath(createConfigureScript()), "/container-entrypoint-initdb.d/03-create-users.sql"); try { this.cleanup = startOrReuse(container); this.container = container; @@ -95,6 +99,7 @@ private Path createConfigureScript() File tempFile = File.createTempFile("init-", ".sql"); Files.write(Joiner.on("\n").join( + "ALTER SESSION SET CONTAINER = XEPDB1;", format("CREATE TABLESPACE %s DATAFILE 'test_db.dat' SIZE 100M ONLINE;", TEST_TABLESPACE), format("CREATE USER %s IDENTIFIED BY %s DEFAULT TABLESPACE %s;", TEST_USER, TEST_PASS, TEST_TABLESPACE), format("GRANT UNLIMITED TABLESPACE TO %s;", TEST_USER), diff --git a/plugin/trino-oracle/src/test/resources/init.sql b/plugin/trino-oracle/src/test/resources/init.sql index 3d948b303b64..ffb5b21255ce 100644 --- a/plugin/trino-oracle/src/test/resources/init.sql +++ b/plugin/trino-oracle/src/test/resources/init.sql @@ -6,3 +6,6 @@ to fix this we have to change the number of processes of SPFILE */ ALTER SYSTEM SET processes=1000 SCOPE=SPFILE; ALTER SYSTEM SET disk_asynch_io = FALSE SCOPE = SPFILE; + +-- disable audit log for reducing diskspace usage +ALTER SYSTEM SET audit_trail=NONE SCOPE=SPFILE; diff --git a/plugin/trino-oracle/src/test/resources/restart.sh b/plugin/trino-oracle/src/test/resources/restart.sh index 1b62c9040cee..621ad90dc4b0 100755 --- a/plugin/trino-oracle/src/test/resources/restart.sh +++ b/plugin/trino-oracle/src/test/resources/restart.sh @@ -2,6 +2,12 @@ echo "Restarting ORACLE" +# Disable listener logging by editing listener.ora for reducing disk space usage +sed -i '/^LOGGING_LISTENER/d' $ORACLE_HOME/network/admin/listener.ora +echo "LOGGING_LISTENER = OFF" >> $ORACLE_HOME/network/admin/listener.ora +echo "TRACE_LEVEL_LISTENER = OFF" >> $ORACLE_HOME/network/admin/listener.ora +echo "DIAG_ADR_ENABLED = OFF" >> $ORACLE_HOME/network/admin/listener.ora + lsnrctl reload && \ sqlplus -s / as sysdba << EOF -- Exit on any errors diff --git a/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorSmokeTest.java b/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorSmokeTest.java index b491e6ab375c..7c9157f0e8ff 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorSmokeTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorSmokeTest.java @@ -277,8 +277,7 @@ public void testDeleteAllDataFromTable() public void testRowLevelDelete() { assumeTrue(hasBehavior(SUPPORTS_CREATE_TABLE) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = new TestTable(getQueryRunner()::execute, "test_row_delete", "AS SELECT * FROM region")) { + try (TestTable table = new TestTable(getQueryRunner()::execute, "test_row_level_delete", "AS SELECT * FROM region")) { assertUpdate("DELETE FROM " + table.getName() + " WHERE regionkey = 2", 1); assertThat(query("SELECT * FROM " + table.getName() + " WHERE regionkey = 2")) .returnsEmptyResult(); diff --git a/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java b/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java index c9fbbc3bffa3..cb1865101614 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java @@ -3463,8 +3463,7 @@ public void testCreateTable() assertQueryFails("CREATE TABLE " + tableName + " (a bad_type)", ".* Unknown type 'bad_type' for column 'a'"); assertThat(getQueryRunner().tableExists(getSession(), tableName)).isFalse(); - // TODO (https://github.com/trinodb/trino/issues/5901) revert to longer name when Oracle version is updated - tableName = "test_cr_not_exists_" + randomNameSuffix(); + tableName = "test_create_not_exists_" + randomNameSuffix(); assertUpdate("CREATE TABLE " + tableName + " (a bigint, b varchar(50), c double)"); assertThat(getQueryRunner().tableExists(getSession(), tableName)).isTrue(); assertTableColumnNames(tableName, "a", "b", "c"); @@ -4345,8 +4344,7 @@ protected void testCommentColumnName(String columnName, boolean delimited) { String nameInSql = toColumnNameInSql(columnName, delimited); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = new TestTable(getQueryRunner()::execute, "test_comment_column", "(" + nameInSql + " integer)")) { + try (TestTable table = new TestTable(getQueryRunner()::execute, "test_comment_column_name", "(" + nameInSql + " integer)")) { assertUpdate("COMMENT ON COLUMN " + table.getName() + "." + nameInSql + " IS 'test comment'"); assertThat(getColumnComment(table.getName(), columnName.replace("'", "''").toLowerCase(ENGLISH))).isEqualTo("test comment"); } @@ -4787,7 +4785,6 @@ public void testDeleteWithComplexPredicate() { skipTestUnless(hasBehavior(SUPPORTS_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated try (TestTable table = createTestTableForWrites("test_delete_complex_", "AS SELECT * FROM nation", "nationkey")) { // delete half the table, then delete the rest assertUpdate("DELETE FROM " + table.getName() + " WHERE nationkey % 2 = 0", "SELECT count(*) FROM nation WHERE nationkey % 2 = 0"); @@ -4806,8 +4803,7 @@ public void testDeleteWithSubquery() // TODO (https://github.com/trinodb/trino/issues/13210) Migrate these tests to AbstractTestEngineOnlyQueries skipTestUnless(hasBehavior(SUPPORTS_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = createTestTableForWrites("test_delete_subquery", "AS SELECT * FROM nation", "nationkey")) { + try (TestTable table = createTestTableForWrites("test_delete_with_subquery", "AS SELECT * FROM nation", "nationkey")) { // delete using a subquery assertUpdate("DELETE FROM " + table.getName() + " WHERE regionkey IN (SELECT regionkey FROM region WHERE name LIKE 'A%')", 15); assertQuery( @@ -4815,8 +4811,7 @@ public void testDeleteWithSubquery() "SELECT * FROM nation WHERE regionkey IN (SELECT regionkey FROM region WHERE name NOT LIKE 'A%')"); } - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = createTestTableForWrites("test_delete_subquery", "AS SELECT * FROM orders", "orderkey")) { + try (TestTable table = createTestTableForWrites("test_delete_with_subquery", "AS SELECT * FROM orders", "orderkey")) { // delete using a scalar and EXISTS subquery assertUpdate("DELETE FROM " + table.getName() + " WHERE orderkey = (SELECT orderkey FROM orders ORDER BY orderkey LIMIT 1)", 1); assertUpdate("DELETE FROM " + table.getName() + " WHERE orderkey = (SELECT orderkey FROM orders WHERE false)", 0); @@ -4869,8 +4864,7 @@ public void testDeleteWithSemiJoin() { skipTestUnless(hasBehavior(SUPPORTS_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = createTestTableForWrites("test_delete_semijoin", "AS SELECT * FROM nation", "nationkey")) { + try (TestTable table = createTestTableForWrites("test_delete_with_semijoin", "AS SELECT * FROM nation", "nationkey")) { // delete with multiple SemiJoin assertUpdate( "DELETE FROM " + table.getName() + " " + @@ -4884,8 +4878,7 @@ public void testDeleteWithSemiJoin() " OR regionkey IN (SELECT regionkey FROM region WHERE length(comment) >= 50)"); } - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = createTestTableForWrites("test_delete_semijoin", "AS SELECT * FROM orders", "orderkey")) { + try (TestTable table = createTestTableForWrites("test_delete_with_semijoin", "AS SELECT * FROM orders", "orderkey")) { // delete with SemiJoin null handling assertUpdate( "DELETE FROM " + table.getName() + "\n" + @@ -4953,8 +4946,7 @@ public void testDeleteAllDataFromTable() public void testRowLevelDelete() { skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE_WITH_DATA) && hasBehavior(SUPPORTS_ROW_LEVEL_DELETE)); - // TODO (https://github.com/trinodb/trino/issues/5901) Use longer table name once Oracle version is updated - try (TestTable table = new TestTable(getQueryRunner()::execute, "test_row_delete", "AS SELECT * FROM region")) { + try (TestTable table = new TestTable(getQueryRunner()::execute, "test_row_level_delete", "AS SELECT * FROM region")) { assertUpdate("DELETE FROM " + table.getName() + " WHERE regionkey = 2", 1); assertQuery("SELECT count(*) FROM " + table.getName(), "VALUES 4"); }