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;