diff --git a/maestro-ios-driver/src/main/kotlin/util/CommandLineUtils.kt b/maestro-ios-driver/src/main/kotlin/util/CommandLineUtils.kt index aa1880f929..892ec91e89 100644 --- a/maestro-ios-driver/src/main/kotlin/util/CommandLineUtils.kt +++ b/maestro-ios-driver/src/main/kotlin/util/CommandLineUtils.kt @@ -14,7 +14,7 @@ object CommandLineUtils { private val logger = LoggerFactory.getLogger(CommandLineUtils::class.java) @Suppress("SpreadOperator") - fun runCommand(parts: List, waitForCompletion: Boolean = true, outputFile: File? = null, params: Map = emptyMap()): Process { + fun runCommand(parts: List, waitForCompletion: Boolean = true, outputFile: File? = null, envVars: Map = emptyMap()): Process { logger.info("Running command line operation: $parts") val processBuilder = if (outputFile != null) { @@ -27,7 +27,7 @@ object CommandLineUtils { .redirectError(nullFile) } - processBuilder.environment().putAll(params) + processBuilder.environment().putAll(envVars) val process = processBuilder.start() if (waitForCompletion) { diff --git a/maestro-ios-driver/src/main/kotlin/util/XCRunnerCLIUtils.kt b/maestro-ios-driver/src/main/kotlin/util/XCRunnerCLIUtils.kt index fd2a8676bd..1bb9178c3b 100644 --- a/maestro-ios-driver/src/main/kotlin/util/XCRunnerCLIUtils.kt +++ b/maestro-ios-driver/src/main/kotlin/util/XCRunnerCLIUtils.kt @@ -1,7 +1,6 @@ package util import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import maestro.utils.MaestroTimer import net.harawata.appdirs.AppDirsFactory import java.io.File import java.nio.file.Files @@ -142,7 +141,7 @@ object XCRunnerCLIUtils { ), waitForCompletion = false, outputFile = outputFile, - params = mapOf("TEST_RUNNER_PORT" to port.toString(), "ACCEPT_REMOTE_CONNECTIONS" to acceptRemoteConnections.toString()) + envVars = mapOf("TEST_RUNNER_PORT" to port.toString(), "ACCEPT_REMOTE_CONNECTIONS" to acceptRemoteConnections.toString()) ) } } diff --git a/maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/XCTestHTTPServer.swift b/maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/XCTestHTTPServer.swift index af688d53b4..4d39d03ad5 100644 --- a/maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/XCTestHTTPServer.swift +++ b/maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/XCTestHTTPServer.swift @@ -29,7 +29,7 @@ struct XCTestHTTPServer { let acceptRemoteConnections = ProcessInfo.processInfo.environment["ACCEPT_REMOTE_CONNECTIONS"] == "true" - let server = HTTPServer(address: acceptRemoteConnections ? .inet6(port: port) : .loopback(port: port)) + let server = HTTPServer(address: acceptRemoteConnections ? .inet6(port: port) : .loopback(port: port), timeout: 100) for route in Route.allCases { let handler = await RouteHandlerFactory.createRouteHandler(route: route)