From d7099d2dce5c29ced984b199e147c7a5670164a1 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Wed, 22 Jan 2025 16:57:23 +0100 Subject: [PATCH] [WIP] Make dev profile compatible with tests and regtests This profile is used by default when running quarkusDev. It is therefore quite convenient if this profile could work with both tests and regression tests. --- .../main/resources/application-dev.properties | 34 +++++++++++++++++++ quarkus/server/build.gradle.kts | 2 -- quarkus/service/build.gradle.kts | 8 +++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 quarkus/defaults/src/main/resources/application-dev.properties diff --git a/quarkus/defaults/src/main/resources/application-dev.properties b/quarkus/defaults/src/main/resources/application-dev.properties new file mode 100644 index 0000000000..d46325388a --- /dev/null +++ b/quarkus/defaults/src/main/resources/application-dev.properties @@ -0,0 +1,34 @@ +# +# 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. +# + +# Configuration for the "dev" profile. This profile is active by default +# when running the quarkusDev Gradle task. + +# This profile is configured to match the expectations of regression tests +# in terms of configuration, but it also allows unit tests to pass when +# executed with quarkusDev. + +quarkus.log.file.enable=false +quarkus.live-reload.instrumentation=true + +polaris.persistence.type=in-memory +polaris.authentication.authenticator.type=test +polaris.authentication.token-service.type=test +polaris.features.defaults."SUPPORTED_CATALOG_STORAGE_TYPES"=["FILE","S3","GCS","AZURE"] +polaris.realm-context.realms=default-realm,realm1 diff --git a/quarkus/server/build.gradle.kts b/quarkus/server/build.gradle.kts index 8e5b4d3911..475880f453 100644 --- a/quarkus/server/build.gradle.kts +++ b/quarkus/server/build.gradle.kts @@ -64,8 +64,6 @@ tasks.named("distTar") { dependsOn("quarkusBuild") } tasks.withType { isFailOnError = false } -tasks.register("polarisServerRun") { dependsOn("quarkusRun") } - distributions { main { contents { diff --git a/quarkus/service/build.gradle.kts b/quarkus/service/build.gradle.kts index 99d72e8c5d..f93605ffbb 100644 --- a/quarkus/service/build.gradle.kts +++ b/quarkus/service/build.gradle.kts @@ -191,3 +191,11 @@ fun JavaForkOptions.addSparkJvmOptions() { "-Djdk.reflect.useDirectMethodHandle=false", ) } + +tasks.register("polarisServerRun") { + dependsOn("quarkusRun") +} + +tasks.register("polarisServerDev") { + dependsOn("quarkusDev") +}