Skip to content

Commit 485fbdc

Browse files
author
Rob Winch
committed
SEC-2963: Select Available Port for appengine
1 parent 22aa91c commit 485fbdc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

samples/gae-xml/gae.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,14 @@ dependencies {
4949

5050
}
5151

52-
project.tasks.appengineFunctionalTest.enabled = false
52+
appengine.httpPort = reservePorts(1)[0]
53+
54+
def reservePorts(int count) {
55+
def sockets = []
56+
for(int i in 1..count) {
57+
sockets << new ServerSocket(0)
58+
}
59+
def result = sockets*.localPort
60+
sockets*.close()
61+
result
62+
}

0 commit comments

Comments
 (0)