flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esam...@apache.org
Subject svn commit: r1156902 - /incubator/flume/branches/flume-728/flume-ng-node/src/test/java/org/apache/flume/node/TestAbstractLogicalNodeManager.java
Date Fri, 12 Aug 2011 00:48:08 GMT
Author: esammer
Date: Fri Aug 12 00:48:08 2011
New Revision: 1156902

URL: http://svn.apache.org/viewvc?rev=1156902&view=rev
Log:
- Use LifecycleState.{START,STOP}_OR_ERROR rather than creating new arrays each time.

Modified:
    incubator/flume/branches/flume-728/flume-ng-node/src/test/java/org/apache/flume/node/TestAbstractLogicalNodeManager.java

Modified: incubator/flume/branches/flume-728/flume-ng-node/src/test/java/org/apache/flume/node/TestAbstractLogicalNodeManager.java
URL: http://svn.apache.org/viewvc/incubator/flume/branches/flume-728/flume-ng-node/src/test/java/org/apache/flume/node/TestAbstractLogicalNodeManager.java?rev=1156902&r1=1156901&r2=1156902&view=diff
==============================================================================
--- incubator/flume/branches/flume-728/flume-ng-node/src/test/java/org/apache/flume/node/TestAbstractLogicalNodeManager.java
(original)
+++ incubator/flume/branches/flume-728/flume-ng-node/src/test/java/org/apache/flume/node/TestAbstractLogicalNodeManager.java
Fri Aug 12 00:48:08 2011
@@ -35,9 +35,8 @@ public class TestAbstractLogicalNodeMana
         for (LogicalNode node : getNodes()) {
           node.stop(context);
 
-          boolean reached = LifecycleController
-              .waitForOneOf(node, new LifecycleState[] { LifecycleState.STOP,
-                  LifecycleState.ERROR });
+          boolean reached = LifecycleController.waitForOneOf(node,
+              LifecycleState.STOP_OR_ERROR);
 
           if (!reached) {
             logger.error(
@@ -60,9 +59,8 @@ public class TestAbstractLogicalNodeMana
         for (LogicalNode node : getNodes()) {
           node.start(context);
 
-          boolean reached = LifecycleController
-              .waitForOneOf(node, new LifecycleState[] { LifecycleState.START,
-                  LifecycleState.ERROR });
+          boolean reached = LifecycleController.waitForOneOf(node,
+              LifecycleState.START_OR_ERROR);
 
           if (!reached) {
             logger.error(
@@ -92,14 +90,14 @@ public class TestAbstractLogicalNodeMana
 
     nodeManager.start(context);
     boolean reached = LifecycleController.waitForOneOf(nodeManager,
-        new LifecycleState[] { LifecycleState.START, LifecycleState.ERROR });
+        LifecycleState.START_OR_ERROR);
 
     Assert.assertTrue(reached);
     Assert.assertEquals(LifecycleState.START, nodeManager.getLifecycleState());
 
     nodeManager.stop(context);
     reached = LifecycleController.waitForOneOf(nodeManager,
-        new LifecycleState[] { LifecycleState.STOP, LifecycleState.ERROR });
+        LifecycleState.STOP_OR_ERROR);
 
     Assert.assertTrue(reached);
     Assert.assertEquals(LifecycleState.STOP, nodeManager.getLifecycleState());
@@ -119,14 +117,14 @@ public class TestAbstractLogicalNodeMana
 
     nodeManager.start(context);
     boolean reached = LifecycleController.waitForOneOf(nodeManager,
-        new LifecycleState[] { LifecycleState.START, LifecycleState.ERROR });
+        LifecycleState.START_OR_ERROR);
 
     Assert.assertTrue(reached);
     Assert.assertEquals(LifecycleState.START, nodeManager.getLifecycleState());
 
     nodeManager.stop(context);
     reached = LifecycleController.waitForOneOf(nodeManager,
-        new LifecycleState[] { LifecycleState.STOP, LifecycleState.ERROR });
+        LifecycleState.STOP_OR_ERROR);
 
     Assert.assertTrue(reached);
     Assert.assertEquals(LifecycleState.STOP, nodeManager.getLifecycleState());
@@ -148,7 +146,7 @@ public class TestAbstractLogicalNodeMana
 
       nodeManager.start(context);
       boolean reached = LifecycleController.waitForOneOf(nodeManager,
-          new LifecycleState[] { LifecycleState.START, LifecycleState.ERROR });
+          LifecycleState.START_OR_ERROR);
 
       Assert.assertTrue(reached);
       Assert
@@ -156,7 +154,7 @@ public class TestAbstractLogicalNodeMana
 
       nodeManager.stop(context);
       reached = LifecycleController.waitForOneOf(nodeManager,
-          new LifecycleState[] { LifecycleState.STOP, LifecycleState.ERROR });
+          LifecycleState.STOP_OR_ERROR);
 
       Assert.assertTrue(reached);
       Assert.assertEquals(LifecycleState.STOP, nodeManager.getLifecycleState());



Mime
View raw message