matrei commented on code in PR #15067:
URL: https://github.com/apache/grails-core/pull/15067#discussion_r2374637274
##########
grails-geb/src/testFixtures/groovy/grails/plugin/geb/GrailsGebSettings.groovy:
##########
@@ -65,17 +73,48 @@ class GrailsGebSettings {
recordingFormat = VncRecordingFormat.valueOf(
System.getProperty('grails.geb.recording.format',
DEFAULT_RECORDING_FORMAT.name())
)
- restartRecordingContainerPerTest =
Boolean.parseBoolean(System.getProperty('grails.geb.recording.restartRecordingContainerPerTest',
'true'))
+ restartRecordingContainerPerTest = getBooleanProperty(
+ 'grails.geb.recording.restartRecordingContainerPerTest',
+ true
+ )
implicitlyWait = getIntProperty('grails.geb.timeouts.implicitlyWait',
DEFAULT_TIMEOUT_IMPLICITLY_WAIT)
pageLoadTimeout = getIntProperty('grails.geb.timeouts.pageLoad',
DEFAULT_TIMEOUT_PAGE_LOAD)
scriptTimeout = getIntProperty('grails.geb.timeouts.script',
DEFAULT_TIMEOUT_SCRIPT)
+ atCheckWaiting = getBooleanProperty('grails.geb.atCheckWaiting',
DEFAULT_AT_CHECK_WAITING)
+ timeout = getNumberProperty('grails.geb.timeouts.timeout',
Wait.DEFAULT_TIMEOUT)
+ retryInterval = getNumberProperty('grails.geb.timeouts.retryInterval',
Wait.DEFAULT_RETRY_INTERVAL)
this.startTime = startTime
}
+ private static boolean getBooleanProperty(String propertyName, boolean
defaultValue) {
+ Boolean.parseBoolean(System.getProperty(propertyName,
defaultValue.toString()))
+ }
+
private static int getIntProperty(String propertyName, int defaultValue) {
Integer.getInteger(propertyName, defaultValue) ?: defaultValue
}
+ private static Number getNumberProperty(String propertyName, Number
defaultValue) {
+ def propValue = System.getProperty(propertyName)
+ if (propValue) {
+ try {
+ if (propValue.contains('.')) {
+ return Double.parseDouble(propValue)
Review Comment:
Changed to `BigDecimal`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]