Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some fixes to use the kill switch

  • Loading branch information...
commit fb569b431a27dc8ec869538e2e28225fc77b41e3 1 parent b3a8bd2
@graemerocher graemerocher authored
View
2  build.gradle
@@ -23,7 +23,7 @@ test {
drivers = ["htmlunit"]
dependencies {
- groovy "org.codehaus.groovy:groovy-all:1.7.5"
+ groovy "org.codehaus.groovy:groovy-all:1.8.6"
def gebVersion = "0.6.3"
def seleniumVersion = "2.0rc3"
View
4 src/test/groovy/grails/functional/tests/BaseSpec.groovy
@@ -11,7 +11,7 @@ import org.openqa.selenium.htmlunit.HtmlUnitDriver
abstract class BaseSpec extends GebReportingSpec{
static PORT = 9184
- static PROCESS_TIMEOUT_MILLS = 1000 * 60 * 5 // 5 minutes
+ static PROCESS_TIMEOUT_MILLS = 1000 * 60 * 5 // 2 minutes
static upgradedProjects = []
static grailsHome = new File(requiredSysProp('grailsHome', "../grails-master")).canonicalPath
@@ -215,7 +215,7 @@ abstract class BaseSpec extends GebReportingSpec{
projectDir = dir
(Process)new ProcessBuilder(toExecute).with {
- redirectErrorStream(true)
+ redirectErrorStream(false)
directory(dir)
environment()["GRAILS_HOME"] = grailsHome
start()
View
9 src/test/groovy/grails/functional/tests/internal/GrailsExecutor.groovy
@@ -38,13 +38,18 @@ class GrailsExecutor {
setPort(port)
def project = app ?: getProject()
setProject(project)
- def process = debug ? executeDebugAsync( app ?: project, "run-app") : executeAsync( app ?: project, "run-app")
+ Process process = debug ? executeDebugAsync( app ?: project, "run-app") : executeAsync( app ?: project, "run-app")
def buffer = new StringBuffer()
process.consumeProcessOutput(buffer, buffer)
def isDebug = parent.isDebug()
waitForPort isDebug, port, {
println buffer
+ try {
+ new URL("http://localhost:${port}").text // activate kill switch
+ } catch (e) {
+ // ignore
+ }
process.destroy()
Assert.fail("Failed to start server after timeout")
}, {
@@ -63,7 +68,7 @@ class GrailsExecutor {
while (timeout < timeoutMax) {
if (Utils.isServerRunningOnPort(port)) {
onSuccess()
- break
+ return timeout
}
else {
timeout += 100
Please sign in to comment.
Something went wrong with that request. Please try again.