diff --git a/application/src/main/kotlin/application/TestCommand.kt b/application/src/main/kotlin/application/TestCommand.kt index 677c24575..77c855f88 100644 --- a/application/src/main/kotlin/application/TestCommand.kt +++ b/application/src/main/kotlin/application/TestCommand.kt @@ -3,6 +3,7 @@ package application import application.test.ContractExecutionListener import `in`.specmatic.core.APPLICATION_NAME_LOWER_CASE import `in`.specmatic.core.Configuration +import `in`.specmatic.core.DEFAULT_TIMEOUT_IN_SECONDS import `in`.specmatic.core.Flags import `in`.specmatic.core.log.Verbose import `in`.specmatic.core.log.logger @@ -85,7 +86,7 @@ class TestCommand : Callable { @Option(names = ["--https"], description = ["Use https instead of the default http"], required = false) var useHttps: Boolean = false - @Option(names = ["--timeout"], description = ["Specify a timeout for the test requests"], required = false, defaultValue = "60") + @Option(names = ["--timeout"], description = ["Specify a timeout in seconds for the test requests. Default value is $DEFAULT_TIMEOUT_IN_SECONDS"], required = false, defaultValue = DEFAULT_TIMEOUT_IN_SECONDS) var timeout: Int = 60 @Option(names = ["--junitReportDir"], description = ["Create junit xml reports in this directory"]) diff --git a/core/src/main/kotlin/in/specmatic/core/SpecmaticConfig.kt b/core/src/main/kotlin/in/specmatic/core/SpecmaticConfig.kt index 6b8ff9d25..6192a2716 100644 --- a/core/src/main/kotlin/in/specmatic/core/SpecmaticConfig.kt +++ b/core/src/main/kotlin/in/specmatic/core/SpecmaticConfig.kt @@ -10,6 +10,7 @@ import java.io.File const val APPLICATION_NAME = "Specmatic" const val APPLICATION_NAME_LOWER_CASE = "specmatic" const val APPLICATION_NAME_LOWER_CASE_LEGACY = "qontract" +const val DEFAULT_TIMEOUT_IN_SECONDS = "60" const val CONTRACT_EXTENSION = "spec" const val LEGACY_CONTRACT_EXTENSION = "qontract" const val YAML = "yaml"