The documentation for all quarkus config options indicates that quarkus.test.wait-time is of Duration type: https://quarkus.io/guides/all-config#quarkus-core_quarkus.test.wait-time. However, passing valid duration strings doesn't work. Only plain numbers representing seconds can be used.
Expected behavior
Passing things like PT20S should work.
Actual behavior
java.lang.NumberFormatException: SRCFG00030: Expected a long value, got "PT2S"
How to Reproduce?
Take some random example project
mvn verify -Pnative -Dquarkus.test.wait-time=PT2S
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.3.1 or latest development version
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
The culprit seems to be the waitTimeValue method in ConfigUtil, which assumes the config value to be a number:
public static Duration waitTimeValue(Config config) {
return Duration.ofSeconds(config.getValue("quarkus.test.wait-time", OptionalLong.class)
.orElse(config.getValue("quarkus.test.jar-wait-time", OptionalLong.class) // legacy value
.orElse(DEFAULT_WAIT_TIME_SECONDS)));
}
Describe the bug
The documentation for all quarkus config options indicates that
quarkus.test.wait-time
is of Duration type: https://quarkus.io/guides/all-config#quarkus-core_quarkus.test.wait-time. However, passing valid duration strings doesn't work. Only plain numbers representing seconds can be used.Expected behavior
Passing things like
PT20S
should work.Actual behavior
How to Reproduce?
mvn verify -Pnative -Dquarkus.test.wait-time=PT2S
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.3.1 or latest development version
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
The culprit seems to be the
waitTimeValue
method inConfigUtil
, which assumes the config value to be a number:https://github.com/quarkusio/quarkus/issues/21087
$upstream:21087$