hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r1392461 - in /hadoop/common/branches/branch-0.23/hadoop-yarn-project: CHANGES.txt hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestCompositeService.java
Date Mon, 01 Oct 2012 17:39:49 GMT
Author: bobby
Date: Mon Oct  1 17:39:49 2012
New Revision: 1392461

URL: http://svn.apache.org/viewvc?rev=1392461&view=rev
Log:
svn merge -c 1386907 FIXES: YARN-28. Fixed TestCompositeService to not depend on test-order
and thus made it pass on JDK7. Contributed by Thomas Graves.

Modified:
    hadoop/common/branches/branch-0.23/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-0.23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestCompositeService.java

Modified: hadoop/common/branches/branch-0.23/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-yarn-project/CHANGES.txt?rev=1392461&r1=1392460&r2=1392461&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.23/hadoop-yarn-project/CHANGES.txt Mon Oct  1 17:39:49
2012
@@ -17,6 +17,9 @@ Release 0.23.5 - UNRELEASED
     YARN-116. Add the ability to change the RM include/exclude file without
     a restart. (xieguiming and Harsh J via sseth)
 
+    YARN-28. Fixed TestCompositeService to not depend on test-order and thus
+    made it pass on JDK7 (Thomas Graves via vinodkv).
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/common/branches/branch-0.23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestCompositeService.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestCompositeService.java?rev=1392461&r1=1392460&r2=1392461&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestCompositeService.java
(original)
+++ hadoop/common/branches/branch-0.23/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestCompositeService.java
Mon Oct  1 17:39:49 2012
@@ -25,6 +25,7 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.yarn.YarnException;
 import org.apache.hadoop.yarn.service.CompositeService;
 import org.apache.hadoop.yarn.service.Service.STATE;
+import org.junit.Before;
 import org.junit.Test;
 
 public class TestCompositeService {
@@ -33,6 +34,11 @@ public class TestCompositeService {
 
   private static final int FAILED_SERVICE_SEQ_NUMBER = 2;
 
+  @Before
+  public void setup() {
+    CompositeServiceImpl.resetCounter();
+  }
+
   @Test
   public void testCallSequence() {
     ServiceManager serviceManager = new ServiceManager("ServiceManager");
@@ -226,6 +232,10 @@ public class TestCompositeService {
       counter = -1;
     }
 
+    public static void resetCounter() {
+      counter = -1;
+    }
+
     public void setThrowExceptionOnStart(boolean throwExceptionOnStart) {
       this.throwExceptionOnStart = throwExceptionOnStart;
     }



Mime
View raw message