From 39d19cc53abe0ce38ceb6fe5252efd640fa95832 Mon Sep 17 00:00:00 2001 From: Roberto Cortez Date: Mon, 26 Aug 2024 18:49:14 +0100 Subject: [PATCH] Use initial Quarkus Dev config for test tags and engines --- .../deployment/dev/testing/TestSupport.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java index a1eeaeae115e9..a71dcc3f09323 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestSupport.java @@ -513,20 +513,20 @@ public void addListener(TestListener listener) { private void handleApplicationPropertiesChange() { SmallRyeConfig updatedConfig = getMinimalConfig(); - List includeTags = getTrimmedListFromConfig(updatedConfig, "quarkus.test.include-tags").orElse(List.of()); - List excludeTags = getTrimmedListFromConfig(updatedConfig, "quarkus.test.exclude-tags").orElse(List.of()); + List includeTags = getTrimmedListFromConfig(updatedConfig, "quarkus.test.include-tags").orElse(null); + List excludeTags = getTrimmedListFromConfig(updatedConfig, "quarkus.test.exclude-tags").orElse(null); String includePattern = updatedConfig.getOptionalValue("quarkus.test.include-pattern", String.class).orElse(null); String excludePattern = updatedConfig.getOptionalValue("quarkus.test.exclude-pattern", String.class).orElse(null); - List includeEngines = getTrimmedListFromConfig(updatedConfig, "quarkus.test.include-engines").orElse(List.of()); - List excludeEngines = getTrimmedListFromConfig(updatedConfig, "quarkus.test.exclude-engines").orElse(List.of()); + List includeEngines = getTrimmedListFromConfig(updatedConfig, "quarkus.test.include-engines").orElse(null); + List excludeEngines = getTrimmedListFromConfig(updatedConfig, "quarkus.test.exclude-engines").orElse(null); TestType testType = updatedConfig.getOptionalValue("quarkus.test.type", TestType.class).orElse(TestType.ALL); if (!firstRun) { if (!Objects.equals(includeTags, appPropertiesIncludeTags)) { - this.includeTags = includeTags; + this.includeTags = Objects.requireNonNullElse(includeTags, Collections.emptyList()); } if (!Objects.equals(excludeTags, appPropertiesExcludeTags)) { - this.excludeTags = excludeTags; + this.excludeTags = Objects.requireNonNullElse(excludeTags, Collections.emptyList()); } if (!Objects.equals(includePattern, appPropertiesIncludePattern)) { if (includePattern == null) { @@ -543,10 +543,10 @@ private void handleApplicationPropertiesChange() { } } if (!Objects.equals(includeEngines, appPropertiesIncludeEngines)) { - this.includeEngines = includeEngines; + this.includeEngines = Objects.requireNonNullElse(includeEngines, Collections.emptyList()); } if (!Objects.equals(excludeEngines, appPropertiesExcludeEngines)) { - this.excludeEngines = excludeEngines; + this.excludeEngines = Objects.requireNonNullElse(excludeEngines, Collections.emptyList()); } if (!Objects.equals(testType, appPropertiesTestType)) { this.testType = testType;