This is an automated email from the ASF dual-hosted git repository. mchades pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push: new 0e4a0dcaa [#5724] fix(bug): testCatalogDetailsCommand() failed in the CI (#5725) 0e4a0dcaa is described below commit 0e4a0dcaa58612e7d6a2699f668124b2b7f63cdc Author: Xun <x...@datastrato.com> AuthorDate: Tue Dec 3 15:20:57 2024 +0800 [#5724] fix(bug): testCatalogDetailsCommand() failed in the CI (#5725) ### What changes were proposed in this pull request? Add `catalog-jdbc-postgresql` in the CLI Gradle build scripts. ### Why are the changes needed? Fix: #5724 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? CI Passed. --- clients/cli/build.gradle.kts | 11 ++++++ clients/cli/src/test/resources/log4j2.properties | 47 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/clients/cli/build.gradle.kts b/clients/cli/build.gradle.kts index ae45fc968..8d42712ea 100644 --- a/clients/cli/build.gradle.kts +++ b/clients/cli/build.gradle.kts @@ -67,3 +67,14 @@ tasks.jar { from(dependencies) duplicatesStrategy = DuplicatesStrategy.EXCLUDE } + +tasks.test { + val skipITs = project.hasProperty("skipITs") + if (skipITs) { + // Exclude integration tests + exclude("**/integration/test/**") + } else { + dependsOn(tasks.jar) + dependsOn(":catalogs:catalog-jdbc-postgresql:jar", ":catalogs:catalog-jdbc-postgresql:runtimeJars") + } +} diff --git a/clients/cli/src/test/resources/log4j2.properties b/clients/cli/src/test/resources/log4j2.properties new file mode 100644 index 000000000..e2e88964c --- /dev/null +++ b/clients/cli/src/test/resources/log4j2.properties @@ -0,0 +1,47 @@ +# +# 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. +# + +# Set to debug or trace if log4j initialization is failing +status = info + +# Name of the configuration +name = ConsoleLogConfig + +# Console appender configuration +appender.console.type = Console +appender.console.name = consoleLogger +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %c{1}:%L - %m%n + +# Log files location +property.logPath = ${sys:gravitino.log.path:-build/clients-cli.log} + +# File appender configuration +appender.file.type = File +appender.file.name = fileLogger +appender.file.fileName = ${logPath} +appender.file.layout.type = PatternLayout +appender.file.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5p %c - %m%n + +# Root logger level +rootLogger.level = info + +# Root logger referring to console and file appenders +rootLogger.appenderRef.stdout.ref = consoleLogger +rootLogger.appenderRef.file.ref = fileLogger