SEC-2963: Select Available Port for appengine

This commit is contained in:
Rob Winch 2015-07-28 22:47:02 -05:00
parent 22aa91c8e1
commit 485fbdc1ee
1 changed files with 11 additions and 1 deletions

View File

@ -49,4 +49,14 @@ dependencies {
}
project.tasks.appengineFunctionalTest.enabled = false
appengine.httpPort = reservePorts(1)[0]
def reservePorts(int count) {
def sockets = []
for(int i in 1..count) {
sockets << new ServerSocket(0)
}
def result = sockets*.localPort
sockets*.close()
result
}