MAPREDUCE-2475. Disable IPV6 for junit tests. (suresh srinivas via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/mapreduce/trunk@1100032 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES.txt b/CHANGES.txt
index 5922b2c..9c1356a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -78,6 +78,8 @@
     MAPREDUCE-2474. Add docs to the new API Partitioner on how to access the
     Job Configuration. (Harsh J Chouraria via todd)
     
+    MAPREDUCE-2475. Disable IPV6 for junit tests. (suresh srinivas via mahadev)
+ 
   OPTIMIZATIONS
     
     MAPREDUCE-2026. Make JobTracker.getJobCounters() and
diff --git a/build.xml b/build.xml
index 70b75d9..8867324 100644
--- a/build.xml
+++ b/build.xml
@@ -683,6 +683,7 @@
         dir="${basedir}" timeout="${test.timeout}"
         errorProperty="tests.failed" failureProperty="tests.failed">
         <jvmarg value="${test.junit.jvmargs}" />
+        <sysproperty key="java.net.preferIPv4Stack" value="true"/>
         <sysproperty key="test.build.data" value="@{test.dir}/data"/>
         <sysproperty key="java.security.krb5.conf"
           value="${test.src.dir}/krb5.conf"/>
diff --git a/src/contrib/build-contrib.xml b/src/contrib/build-contrib.xml
index 3fa22c8..5802b5b 100644
--- a/src/contrib/build-contrib.xml
+++ b/src/contrib/build-contrib.xml
@@ -409,6 +409,7 @@
         dir="${basedir}" timeout="${test.timeout}"
         errorProperty="tests.failed" failureProperty="tests.failed">
         <jvmarg value="${test.junit.jvmargs}" />
+        <sysproperty key="java.net.preferIPv4Stack" value="true"/> 
         <sysproperty key="test.build.data" value="@{test.dir}/data"/>
         <sysproperty key="test.tools.input.dir" value = "${test.tools.input.dir}"/>
         <sysproperty key="test.cache.data" value="${test.cache.data}"/>