hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1490125 - in /hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common: CHANGES.txt src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java
Date Thu, 06 Jun 2013 04:18:14 GMT
Author: suresh
Date: Thu Jun  6 04:18:13 2013
New Revision: 1490125

URL: http://svn.apache.org/r1490125
Log:
HADOOP-8982. Merge 1490124 from trunk

Modified:
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1490125&r1=1490124&r2=1490125&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Thu Jun
 6 04:18:13 2013
@@ -426,6 +426,9 @@ Release 2.1.0-beta - UNRELEASED
     HADOOP-9526. TestShellCommandFencer and TestShell fail on Windows.
     (Arpit Agarwal via suresh)
 
+    HADOOP-8982. TestSocketIOWithTimeout fails on Windows.
+    (Chris Nauroth via suresh)
+
 Release 2.0.5-alpha - UNRELEASED
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java?rev=1490125&r1=1490124&r2=1490125&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java
Thu Jun  6 04:18:13 2013
@@ -32,6 +32,7 @@ import org.apache.hadoop.test.Multithrea
 import org.apache.hadoop.test.MultithreadedTestUtil.TestContext;
 import org.apache.hadoop.test.MultithreadedTestUtil.TestingThread;
 import org.apache.hadoop.util.Time;
+import org.apache.hadoop.util.Shell;
 
 import org.junit.Test;
 import static org.junit.Assert.*;
@@ -144,12 +145,20 @@ public class TestSocketIOWithTimeout {
       // Nevertheless, the output stream is closed, because
       // a partial write may have succeeded (see comment in
       // SocketOutputStream#write(byte[]), int, int)
-      try {
-        out.write(1);
-        fail("Did not throw");
-      } catch (IOException ioe) {
-        GenericTestUtils.assertExceptionContains(
-            "stream is closed", ioe);
+      // This portion of the test cannot pass on Windows due to differences in
+      // behavior of partial writes.  Windows appears to buffer large amounts of
+      // written data and send it all atomically, thus making it impossible to
+      // simulate a partial write scenario.  Attempts were made to switch the
+      // test from using a pipe to a network socket and also to use larger and
+      // larger buffers in doIO.  Nothing helped the situation though.
+      if (!Shell.WINDOWS) {
+        try {
+          out.write(1);
+          fail("Did not throw");
+        } catch (IOException ioe) {
+          GenericTestUtils.assertExceptionContains(
+              "stream is closed", ioe);
+        }
       }
       
       out.close();



Mime
View raw message