From 4f678b364294a113d3732bf9fd086b27dd2b6b6a Mon Sep 17 00:00:00 2001 From: Holly Cummins Date: Tue, 21 May 2024 17:40:30 +0100 Subject: [PATCH 1/2] Enable test which is now passing in HEAD, because of #40601 --- .../src/main/resources/application.properties | 193 ------------------ .../test-extension/tests/pom.xml | 23 +++ .../extension/it/TestParameterDevModeIT.java | 2 - .../extension/it/TestParameterTestModeIT.java | 2 +- .../src/main/resources/application.properties | 3 +- 5 files changed, 26 insertions(+), 197 deletions(-) diff --git a/integration-tests/test-extension/extension-that-defines-junit-test-extensions/deployment/src/main/resources/application.properties b/integration-tests/test-extension/extension-that-defines-junit-test-extensions/deployment/src/main/resources/application.properties index 3ed057571a910..e69de29bb2d1d 100644 --- a/integration-tests/test-extension/extension-that-defines-junit-test-extensions/deployment/src/main/resources/application.properties +++ b/integration-tests/test-extension/extension-that-defines-junit-test-extensions/deployment/src/main/resources/application.properties @@ -1,193 +0,0 @@ -# Log settings -# log level in lower case for testing -quarkus.log.level=info -quarkus.log.file.enable=true -quarkus.log.file.level=INFO -quarkus.log.file.format=%d{HH:mm:ss} %-5p [%c{2.}]] (%t) %s%e%n - -# Resource path to DSAPublicKey base64 encoded bytes -quarkus.root.dsa-key-location=/DSAPublicKey.encoded - -# Have the TestProcessor validate the build time configuration below -quarkus.root.validate-build-config=true - - -### Configuration settings for the TestBuildTimeConfig config root -quarkus.bt.bt-string-opt=btStringOptValue -quarkus.bt.bt-sbv=StringBasedValue -# This is not set so that we should get the @ConfigItem defaultValue -#quarkus.bt.bt-sbv-with-default=StringBasedValue -quarkus.bt.all-values.oov=configPart1+configPart2 -quarkus.bt.all-values.ovo=configPart1+configPart2 -# This is not set so that we should get the @ConfigItem defaultValue -#quarkus.bt.bt-oov-with-default=ObjectOfValue -quarkus.bt.all-values.long-primitive=1234567891 -quarkus.bt.all-values.double-primitive=3.1415926535897932384 -quarkus.bt.all-values.long-value=1234567892 -quarkus.bt.all-values.opt-long-value=1234567893 -quarkus.bt.all-values.opt-double-value=3.1415926535897932384 -quarkus.bt.all-values.optional-long-value=1234567894 -quarkus.bt.all-values.nested-config-map.key1.nested-value=value1 -quarkus.bt.all-values.nested-config-map.key1.oov=value1.1+value1.2 -quarkus.bt.all-values.nested-config-map.key2.nested-value=value2 -quarkus.bt.all-values.nested-config-map.key2.oov=value2.1+value2.2 -quarkus.bt.all-values.string-list=value1,value2 -quarkus.bt.all-values.long-list=1,2,3 -quarkus.bt.bt-config-value=${test.record.expansion} -test.record.expansion=value -quarkus.bt.bt-config-value-empty= - -### Duplicate settings for the TestBuildAndRunTimeConfig. May be able to drop if ConfigRoot inheritance is added -quarkus.btrt.bt-string-opt=btStringOptValue -quarkus.btrt.bt-sbv=StringBasedValue -quarkus.btrt.all-values.oov=configPart1+configPart2 -quarkus.btrt.all-values.ovo=configPart1+configPart2 -quarkus.btrt.all-values.long-primitive=1234567891 -quarkus.btrt.all-values.double-primitive=3.1415926535897932384 -quarkus.btrt.all-values.long-value=1234567892 -quarkus.btrt.all-values.opt-long-value=1234567893 -quarkus.btrt.all-values.opt-double-value=3.1415926535897932384 -quarkus.btrt.all-values.optional-long-value=1234567894 -quarkus.btrt.all-values.nested-config-map.key1.nested-value=value1 -quarkus.btrt.all-values.nested-config-map.key1.oov=value1.1+value1.2 -quarkus.btrt.all-values.nested-config-map.key2.nested-value=value2 -quarkus.btrt.all-values.nested-config-map.key2.oov=value2.1+value2.2 -quarkus.btrt.all-values.string-list=value1,value2 -quarkus.btrt.all-values.long-list=1,2,3 -# The expansion value is not available in runtime so we need to set it directly. -quarkus.btrt.all-values.expanded-default=1234 - -### Configuration settings for the TestRunTimeConfig config root -quarkus.rt.rt-string-opt=rtStringOptValue -quarkus.rt.rt-string-opt-with-default=rtStringOptWithDefaultValue -quarkus.rt.all-values.oov=configPart1+configPart2 -quarkus.rt.all-values.ovo=configPart1+configPart2 -quarkus.rt.all-values.long-primitive=12345678911 -quarkus.rt.all-values.double-primitive=3.1415926535897932384 -quarkus.rt.all-values.long-value=12345678921 -quarkus.rt.all-values.opt-long-value=12345678931 -quarkus.rt.all-values.opt-double-value=3.1415926535897932384 -quarkus.rt.all-values.optional-long-value=12345678941 -quarkus.rt.all-values.nested-config-map.key1.nested-value=value1 -quarkus.rt.all-values.nested-config-map.key1.oov=value1.1+value1.2 -quarkus.rt.all-values.nested-config-map.key2.nested-value=value2 -quarkus.rt.all-values.nested-config-map.key2.oov=value2.1+value2.2 -quarkus.rt.all-values.string-list=value1,value2 -quarkus.rt.all-values.long-list=1,2,3 -# A nested map of properties -quarkus.rt.all-values.string-map.key1=value1 -quarkus.rt.all-values.string-map.key2=value2 -quarkus.rt.all-values.string-map.key3=value3 -# And list form -quarkus.rt.all-values.string-list-map.key1=value1,value2,value3 -quarkus.rt.all-values.string-list-map.key2=value4,value5 -quarkus.rt.all-values.string-list-map.key3=value6 -# A root map of properties -quarkus.rt.string-map.key1=value1 -quarkus.rt.string-map.key2=value2 -quarkus.rt.string-map.key3=value3 -# And list form -quarkus.rt.string-list-map.key1=value1 -quarkus.rt.string-list-map.key2=value2,value3 -quarkus.rt.string-list-map.key3=value4,value5,value6 - -### run time configuration using enhanced converters -quarkus.rt.my-enum=enum-two -quarkus.rt.my-enums=enum-one,enum-two -quarkus.rt.my-optional-enums=optional -quarkus.rt.no-hyphenate-first-enum=ENUM_ONE -quarkus.rt.no-hyphenate-second-enum=Enum_Two -quarkus.rt.primitive-boolean=YES -quarkus.rt.object-boolean=NO -quarkus.rt.primitive-integer=two -quarkus.rt.object-integer=nine -quarkus.rt.one-to-nine=one,two,three,four,five,six,seven,eight,nine -quarkus.rt.map-of-numbers.key1=one -quarkus.rt.map-of-numbers.key2=two - -### map configurations -quarkus.rt.leaf-map.key.first=first-key-value -quarkus.rt.leaf-map.key.second=second-key-value -quarkus.rt.config-group-map.key.group.nested-value=value -quarkus.rt.config-group-map.key.group.oov=value2.1+value2.2 - -### build time and run time configuration using enhanced converters -quarkus.btrt.map-of-numbers.key1=one -quarkus.btrt.map-of-numbers.key2=two -quarkus.btrt.my-enum=optional -quarkus.btrt.my-enums=optional,enum-one,enum-two - -### anonymous root property -quarkus.test-property=foo - -### map of map of strings -quarkus.rt.map-map.outer-key.inner-key=1234 -quarkus.btrt.map-map.outer-key.inner-key=1234 -quarkus.bt.map-map.outer-key.inner-key=1234 - -# Test config root with "RuntimeConfig" suffix -quarkus.foo.bar=huhu - -### named map with profiles -quarkus.btrt.map-map.main-profile.property=1234 -%test.quarkus.btrt.map-map.test-profile.property=5678 - -### ordinal and default values source -config_ordinal=1000 -my.prop=1234 -%prod.my.prop=1234 -%dev.my.prop=5678 -%test.my.prop=1234 - -### Unknown properties -quarkus.unknown.prop=1234 -quarkus.http.non-application-root-path=/1234 -quarkus.http.ssl-port=4443 -# This is how Env Source will output property names (for maps) -QUARKUS_HTTP_NON_APPLICATION_ROOT_PATH=/1234 -quarkus.http.non.application.root.path=/1234 -QUARKUS_HTTP_SSL_PORT=4443 -quarkus.http.ssl.port=4443 -quarkus.arc.unremovable-types=foo -# The YAML source may add an indexed property (depending on how the YAML is laid out). This is not supported by @ConfigRoot -quarkus.arc.unremovable-types[0]=foo - -### Do not record env values in build time -bt.ok.to.record=properties -%test.bt.profile.record=properties - -### mappings -quarkus.mapping.bt.value=value -quarkus.mapping.bt.group.value=value -quarkus.mapping.bt.present.value=present -quarkus.mapping.bt.groups[0].value=first -quarkus.mapping.bt.groups[1].value=second - -quarkus.mapping.btrt.value=value -quarkus.mapping.btrt.group.value=value - -quarkus.mapping.rt.value=value -quarkus.mapping.rt.group.value=value - -### prefix -my.prefix.prop=1234 -my.prefix.map.prop=1234 -my.prefix.nested.nested-value=nested-1234 -my.prefix.nested.oov=nested-1234+nested-5678 -my.prefix.named.prop=1234 -my.prefix.named.map.prop=1234 -my.prefix.named.nested.nested-value=nested-1234 -my.prefix.named.nested.oov=nested-1234+nested-5678 - -my.prefix.bt.prop=1234 -my.prefix.bt.nested.nested-value=nested-1234 -my.prefix.bt.nested.oov=nested-1234+nested-5678 - -another.another-prefix.prop=5678 -another.another-prefix.map.prop=5678 - -proprietary.root.config.value=1234 -proprietary.mapping.config.value=1234 -proprietary.should.not.report.unknown=1234 - -unremoveable.value=1234 diff --git a/integration-tests/test-extension/tests/pom.xml b/integration-tests/test-extension/tests/pom.xml index c00c53b56d37c..801e54684ca19 100644 --- a/integration-tests/test-extension/tests/pom.xml +++ b/integration-tests/test-extension/tests/pom.xml @@ -176,6 +176,29 @@ uber-jar + + native-image + + + native + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + true + + + + + + diff --git a/integration-tests/test-extension/tests/src/test/java/io/quarkus/it/extension/it/TestParameterDevModeIT.java b/integration-tests/test-extension/tests/src/test/java/io/quarkus/it/extension/it/TestParameterDevModeIT.java index 08717caa64c40..83355e35ca946 100644 --- a/integration-tests/test-extension/tests/src/test/java/io/quarkus/it/extension/it/TestParameterDevModeIT.java +++ b/integration-tests/test-extension/tests/src/test/java/io/quarkus/it/extension/it/TestParameterDevModeIT.java @@ -7,7 +7,6 @@ import org.apache.maven.shared.invoker.MavenInvocationException; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; @@ -21,7 +20,6 @@ *

* mvn install -Dit.test=DevMojoIT#methodName */ -@Disabled // because of /~https://github.com/quarkiverse/quarkus-pact/issues/73 @DisabledIfSystemProperty(named = "quarkus.test.native", matches = "true") public class TestParameterDevModeIT extends RunAndCheckMojoTestBase { diff --git a/integration-tests/test-extension/tests/src/test/java/io/quarkus/it/extension/it/TestParameterTestModeIT.java b/integration-tests/test-extension/tests/src/test/java/io/quarkus/it/extension/it/TestParameterTestModeIT.java index 1a9867be18681..b5f2bb42f7c00 100644 --- a/integration-tests/test-extension/tests/src/test/java/io/quarkus/it/extension/it/TestParameterTestModeIT.java +++ b/integration-tests/test-extension/tests/src/test/java/io/quarkus/it/extension/it/TestParameterTestModeIT.java @@ -20,8 +20,8 @@ *

* mvn install -Dit.test=DevMojoIT#methodName */ -@Disabled // because of /~https://github.com/quarkiverse/quarkus-pact/issues/73 @DisabledIfSystemProperty(named = "quarkus.test.native", matches = "true") +@Disabled("The base function now works via quarkus:test, but the test infrastructure for seeing how many tests ran needs the dev ui to be running") public class TestParameterTestModeIT extends RunAndCheckMojoTestBase { @Override diff --git a/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-parameter-injection/src/main/resources/application.properties b/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-parameter-injection/src/main/resources/application.properties index 9e0b5c5fcead3..8d698e657885b 100644 --- a/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-parameter-injection/src/main/resources/application.properties +++ b/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-parameter-injection/src/main/resources/application.properties @@ -1,2 +1,3 @@ quarkus.test.continuous-testing=enabled -quarkus.rest-client.alpaca-api.url=http://localhost:8085/ +# this should not be needed, but something in the tests is setting this to 1234 and confusing the test framework, so set it here to match +quarkus.http.non-application-root-path=1234 \ No newline at end of file From b24844caee4c0a9806330be037a4fe6a5cb8866b Mon Sep 17 00:00:00 2001 From: Holly Cummins Date: Tue, 21 May 2024 17:57:37 +0100 Subject: [PATCH 2/2] Patch up tests which aren't expected to pass, but which should fail for the right reasons. --- .../src/main/resources/application.properties | 4 +++- .../src/main/resources/application.properties | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-callback-from-extension/src/main/resources/application.properties b/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-callback-from-extension/src/main/resources/application.properties index 442095ca8410c..8d698e657885b 100644 --- a/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-callback-from-extension/src/main/resources/application.properties +++ b/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-callback-from-extension/src/main/resources/application.properties @@ -1 +1,3 @@ -quarkus.test.continuous-testing=enabled \ No newline at end of file +quarkus.test.continuous-testing=enabled +# this should not be needed, but something in the tests is setting this to 1234 and confusing the test framework, so set it here to match +quarkus.http.non-application-root-path=1234 \ No newline at end of file diff --git a/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-template-from-extension/src/main/resources/application.properties b/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-template-from-extension/src/main/resources/application.properties index 442095ca8410c..8d698e657885b 100644 --- a/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-template-from-extension/src/main/resources/application.properties +++ b/integration-tests/test-extension/tests/src/test/resources-filtered/projects/project-using-test-template-from-extension/src/main/resources/application.properties @@ -1 +1,3 @@ -quarkus.test.continuous-testing=enabled \ No newline at end of file +quarkus.test.continuous-testing=enabled +# this should not be needed, but something in the tests is setting this to 1234 and confusing the test framework, so set it here to match +quarkus.http.non-application-root-path=1234 \ No newline at end of file