Repository: incubator-geode
Updated Branches:
  refs/heads/develop 718bdfcc0 -> d0f9dc355


GEODE-1905: Address UnknownPropertyException when running tests with Gradle 3.0+

This closes #242


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d0f9dc35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d0f9dc35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d0f9dc35

Branch: refs/heads/develop
Commit: d0f9dc3557db4bcb52aa178d0c00d22139a98726
Parents: 718bdfc
Author: Jared Stewart <jstew...@pivotal.io>
Authored: Mon Sep 19 10:37:18 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Mon Sep 19 11:57:12 2016 -0700

----------------------------------------------------------------------
 gradle/test.gradle | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0f9dc35/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 2dd8a06..5b895ba 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -14,15 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+import org.apache.mina.util.AvailablePortFinder as MinaAvailablePortFinder
+
+buildscript {
+  repositories {
+    mavenCentral()
+  }
+
+  dependencies {
+    classpath group: 'org.apache.mina', name: 'mina-core', version: '2.0.14'
+  }
+}
+
 def testResultsDir(def parent, def name) {
   new File(parent, name)
 }
 
 def writeTestProperties(def parent, def name) {
-  def availablePortFinder = AvailablePortFinder.createPrivate()
-  
   def props = new Properties()
-  props.setProperty('mcast-port', 
Integer.toString(availablePortFinder.nextAvailable))
+  props.setProperty('mcast-port', 
Integer.toString(MinaAvailablePortFinder.getNextAvailable()))
   props.setProperty('log-level', 'config')
   def propsFile = new File(testResultsDir(parent, name), 'gemfire.properties')
   def writer = propsFile.newWriter()
@@ -61,7 +71,7 @@ subprojects {
     testCompile 'org.jmock:jmock-junit4:' + project.'jmock.version'
     testCompile 'org.jmock:jmock-legacy:' + project.'jmock.version'
     testCompile 'pl.pragmatists:JUnitParams:' + project.'JUnitParams.version'
-    
+
     testRuntime 'cglib:cglib:' + project.'cglib.version'
     testRuntime 'org.ow2.asm:asm:' + project.'asm.version'
   }

Reply via email to