Procházet zdrojové kódy

MAPREDUCE-5095. TestShuffleExceptionCount#testCheckException fails occasionally with JDK7. (Contributed by Arpit Agarwal)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1484577 13f79535-47bb-0310-9956-ffa450edef68
Hitesh Shah před 12 roky
rodič
revize
89248efdf8

+ 3 - 0
CHANGES.txt

@@ -49,6 +49,9 @@ Release 1.3.0 - unreleased
     MAPREDUCE-5217. Fix DistCP to work when launched by Oozie on a secure
     cluster. (Venkat Ranganathan via sseth)
 
+    MAPREDUCE-5095. TestShuffleExceptionCount#testCheckException fails
+    occasionally with JDK7 (Arpit Agarwal via hitesh)
+
 Release 1.2.1 - Unreleased 
 
   INCOMPATIBLE CHANGES

+ 3 - 4
src/test/org/apache/hadoop/mapred/TestShuffleExceptionCount.java

@@ -23,7 +23,7 @@ import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
-import org.junit.BeforeClass;
+import org.junit.Before;
 import org.junit.Test;
 
 public class TestShuffleExceptionCount {
@@ -31,8 +31,8 @@ public class TestShuffleExceptionCount {
   static boolean abortCalled = false;
   private final float epsilon = 1e-5f;
 
-  @BeforeClass
-  public static void initialize() throws Exception {
+  @Before
+  public void initialize() throws Exception {
     abortCalled = false;
   }
     
@@ -52,7 +52,6 @@ public class TestShuffleExceptionCount {
 
   @Test
   public void testCheckException() throws IOException, InterruptedException {
-
     // first test with only MsgRegex set but doesn't match
     String exceptionMsgRegex = "Broken pipe";
     String exceptionStackRegex = null;