ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject [1/3] Revert "AMBARI-4791. API call to restart all components on one or more hosts should result in one request. (swagle)"
Date Tue, 25 Feb 2014 19:57:44 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk c6987eeef -> 668d4c26d


http://git-wip-us.apache.org/repos/asf/ambari/blob/668d4c26/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 2e114ef..dc4c5a5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -73,7 +73,6 @@ import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.internal.ComponentResourceProviderTest;
 import org.apache.ambari.server.controller.internal.HostResourceProviderTest;
-import org.apache.ambari.server.controller.internal.RequestResourceFilter;
 import org.apache.ambari.server.controller.internal.ServiceResourceProviderTest;
 import org.apache.ambari.server.customactions.ActionDefinition;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
@@ -2349,12 +2348,8 @@ public class AmbariManagementControllerTest {
       put("excluded_hosts", "h2");
       put("align_maintenance_state", "true");
     }};
-    RequestResourceFilter resourceFilter = new RequestResourceFilter("HBASE", "HBASE_MASTER",
null);
-    List<RequestResourceFilter> resourceFilters = new ArrayList<RequestResourceFilter>();
-    resourceFilters.add(resourceFilter);
-
-    ExecuteActionRequest request = new ExecuteActionRequest(clusterName,
-      "DECOMMISSION", null, resourceFilters, params);
+    ExecuteActionRequest request = new ExecuteActionRequest(clusterName, "DECOMMISSION",
null, "HBASE", "HBASE_MASTER",
+        null, params);
 
     Map<String, String> requestProperties = new HashMap<String, String>();
     requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
@@ -2395,11 +2390,10 @@ public class AmbariManagementControllerTest {
           put("slave_type", "HBASE_REGIONSERVER");
           put("align_maintenance_state", "true");
         }};
-    request = new ExecuteActionRequest(clusterName, "DECOMMISSION", params);
-    resourceFilter = new RequestResourceFilter("HBASE", "HBASE_MASTER", null);
-    request.getResourceFilters().add(resourceFilter);
+    request = new ExecuteActionRequest(clusterName, "DECOMMISSION", null, "HBASE", "HBASE_MASTER",
null, params);
 
-    response = controller.createAction(request, requestProperties);
+    response = controller.createAction(request,
+        requestProperties);
 
     storedTasks = actionDB.getRequestTasks(response.getRequestId());
     execCmd = storedTasks.get(0).getExecutionCommandWrapper
@@ -2422,8 +2416,8 @@ public class AmbariManagementControllerTest {
     params = new HashMap<String, String>() {{
       put("included_hosts", "h2");
     }};
-    request = new ExecuteActionRequest(clusterName, "DECOMMISSION", null,
-      resourceFilters, params);
+    request = new ExecuteActionRequest(clusterName, "DECOMMISSION", null, "HBASE", "HBASE_MASTER",
+        null, params);
 
     response = controller.createAction(request,
         requestProperties);
@@ -3848,11 +3842,8 @@ public class AmbariManagementControllerTest {
     requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
 
     ArrayList<String> hosts = new ArrayList<String>() {{add("h1");}};
-    RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", "DATANODE",
hosts);
-    List<RequestResourceFilter> resourceFilters = new ArrayList<RequestResourceFilter>();
-    resourceFilters.add(resourceFilter);
 
-    ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1", null, "a1", resourceFilters,
params);
+    ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1", null, "a1", "HDFS",
"DATANODE", hosts, params);
     RequestStatusResponse response = controller.createAction(actionRequest, requestProperties);
     assertEquals(1, response.getTasks().size());
     ShortTaskStatus taskStatus = response.getTasks().get(0);
@@ -3868,13 +3859,10 @@ public class AmbariManagementControllerTest {
     Assert.assertEquals("h1", task.getHostName());
     ExecutionCommand cmd = task.getExecutionCommandWrapper().getExecutionCommand();
     Assert.assertTrue(cmd.getCommandParams().containsKey("test"));
-    Assert.assertEquals("HDFS", cmd.getServiceName());
-    Assert.assertEquals("DATANODE", cmd.getComponentName());
+    Assert.assertEquals(cmd.getServiceName(), "HDFS");
+    Assert.assertEquals(cmd.getComponentName(), "DATANODE");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("", "", null);
-    resourceFilters.add(resourceFilter);
-    actionRequest = new ExecuteActionRequest("c1", null, "a2", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a2", "", "", null, params);
     response = controller.createAction(actionRequest, requestProperties);
     assertEquals(2, response.getTasks().size());
 
@@ -3882,27 +3870,18 @@ public class AmbariManagementControllerTest {
     task = storedTasks2.get(1);
     Assert.assertEquals(RoleCommand.ACTIONEXECUTE, task.getRoleCommand());
     Assert.assertEquals("a2", task.getRole().name());
-    HashSet<String> expectedHosts = new HashSet<String>() {{
-      add("h2");
-      add("h1");
-    }};
-    HashSet<String> actualHosts = new HashSet<String>() {{
-      add(storedTasks2.get(1).getHostName());
-      add(storedTasks2.get(0).getHostName());
-    }};
+    HashSet<String> expectedHosts = new HashSet<String>(){{add("h2"); add("h1");}};
+    HashSet<String> actualHosts = new HashSet<String>(){{add(storedTasks2.get(1).getHostName());
add(storedTasks2
+        .get(0).getHostName());}};
     Assert.assertEquals(expectedHosts, actualHosts);
 
     cmd = task.getExecutionCommandWrapper().getExecutionCommand();
     Assert.assertTrue(cmd.getCommandParams().containsKey("test"));
-    Assert.assertEquals("HDFS", cmd.getServiceName());
-    Assert.assertEquals("DATANODE", cmd.getComponentName());
+    Assert.assertEquals(cmd.getServiceName(), "HDFS");
+    Assert.assertEquals(cmd.getComponentName(), "DATANODE");
 
     hosts = new ArrayList<String>() {{add("h3");}};
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("", "", hosts);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", null, "a1", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a1", "", "", hosts, params);
     response = controller.createAction(actionRequest, requestProperties);
     assertEquals(1, response.getTasks().size());
     taskStatus = response.getTasks().get(0);
@@ -3972,13 +3951,10 @@ public class AmbariManagementControllerTest {
     Map<String, String> params = new HashMap<String, String>() {{
       put("test", "test");
     }};
-    RequestResourceFilter resourceFilter = new RequestResourceFilter(
-      "HDFS",
-      "HDFS_CLIENT",
-      new ArrayList<String>() {{ add("h1"); }});
     ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1",
-      "RESTART", params);
-    actionRequest.getResourceFilters().add(resourceFilter);
+      "RESTART", null, "HDFS", "HDFS_CLIENT",
+      new ArrayList<String>() {{ add("h1"); }},
+      params);
 
     Map<String, String> requestProperties = new HashMap<String, String>();
     requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
@@ -4055,50 +4031,34 @@ public class AmbariManagementControllerTest {
     Map<String, String> params = new HashMap<String, String>() {{
       put("test", "test");
     }};
-
-    RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", null, null);
-
-    ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1", "NON_EXISTENT_CHECK",
params);
-    actionRequest.getResourceFilters().add(resourceFilter);
+    ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1", "NON_EXISTENT_CHECK",
"HDFS", params);
 
     Map<String, String> requestProperties = new HashMap<String, String>();
     requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
 
     expectActionCreationErrorWithMessage(actionRequest, requestProperties, "Unsupported action");
 
-    //actionRequest = new ExecuteActionRequest("c1", "NON_EXISTENT_SERVICE_CHECK", "HDFS",
params);
-    //expectActionCreationErrorWithMessage(actionRequest, requestProperties, "Unsupported
action");
-
-    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION_DATANODE", params);
-    actionRequest.getResourceFilters().add(resourceFilter);
-
+    actionRequest = new ExecuteActionRequest("c1", "NON_EXISTENT_SERVICE_CHECK", "HDFS",
params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
-      "Unsupported action DECOMMISSION_DATANODE for Service: HDFS and Component: null");
-
-    //actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", "HDFS", params);
-    //expectActionCreationErrorWithMessage(actionRequest, requestProperties, "Unsupported
action DECOMMISSION for Service: HDFS and Component: null");
+        "Unsupported action");
 
-    resourceFilter = new RequestResourceFilter("HDFS", "HDFS_CLIENT", null);
-    List<RequestResourceFilter> resourceFilters = new ArrayList<RequestResourceFilter>();
-    resourceFilters.add(resourceFilter);
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION_DATANODE", "HDFS", params);
+    expectActionCreationErrorWithMessage(actionRequest, requestProperties,
+        "Unsupported action DECOMMISSION_DATANODE for Service: HDFS and Component: null");
 
-    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, resourceFilters,
params);
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", "HDFS", params);
+    expectActionCreationErrorWithMessage(actionRequest, requestProperties,
+        "Unsupported action DECOMMISSION for Service: HDFS and Component: null");
 
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, "HDFS", "HDFS_CLIENT",
null, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Unsupported action DECOMMISSION for Service: HDFS and Component: HDFS_CLIENT");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS", null, null);
-    resourceFilters.add(resourceFilter);
-    actionRequest = new ExecuteActionRequest("c1", null, "DECOMMISSION_DATANODE", resourceFilters,
params);
+    actionRequest = new ExecuteActionRequest("c1", null, "DECOMMISSION_DATANODE", "HDFS",
null, null, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action DECOMMISSION_DATANODE does not exist");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("YARN", "RESOURCEMANAGER", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, resourceFilters,
params);
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, "YARN", "RESOURCEMANAGER",
null, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Service not found, clusterName=c1, serviceName=YARN");
 
@@ -4106,12 +4066,7 @@ public class AmbariManagementControllerTest {
       put("included_hosts", "h1,h2");
       put("excluded_hosts", "h1,h3");
     }};
-
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS", "NAMENODE", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, resourceFilters,
params2);
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, "HDFS", "NAMENODE",
null, params2);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Same host cannot be specified for inclusion as well as exclusion. Hosts: [h1]");
 
@@ -4120,21 +4075,13 @@ public class AmbariManagementControllerTest {
       put("excluded_hosts", "h4, h3");
       put("slave_type", "HDFS_CLIENT");
     }};
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS", "NAMENODE", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, resourceFilters,
params2);
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, "HDFS", "NAMENODE",
null, params2);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Component HDFS_CLIENT is not supported for decommissioning.");
 
     List<String> hosts = new ArrayList<String>();
     hosts.add("h6");
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS", "NAMENODE", hosts);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, resourceFilters,
params2);
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, "HDFS", "NAMENODE",
hosts, params2);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Decommission command cannot be issued with target host(s) specified.");
 
@@ -4142,11 +4089,7 @@ public class AmbariManagementControllerTest {
     params2 = new HashMap<String, String>() {{
       put("excluded_hosts", "h1 ");
     }};
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS", "NAMENODE", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, resourceFilters,
params2);
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, "HDFS", "NAMENODE",
null, params2);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Component DATANODE on host h1 cannot be decommissioned as its not in STARTED state");
 
@@ -4154,7 +4097,7 @@ public class AmbariManagementControllerTest {
       put("excluded_hosts", "h1 ");
       put("mark_draining_only", "true");
     }};
-    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, resourceFilters,
params2);
+    actionRequest = new ExecuteActionRequest("c1", "DECOMMISSION", null, "HDFS", "NAMENODE",
null, params2);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "mark_draining_only is not a valid parameter for NAMENODE");
 
@@ -4174,91 +4117,58 @@ public class AmbariManagementControllerTest {
         "a4", ActionType.SYSTEM, "", "HIVE", "", "Does file exist",
         TargetHostType.ANY, Short.valueOf("100")));
 
-    actionRequest = new ExecuteActionRequest("c1", null, "a1", null, null);
+    actionRequest = new ExecuteActionRequest("c1", null, "a1", null, null, null, null);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a1 requires input 'test' that is not provided");
 
-    actionRequest = new ExecuteActionRequest("c1", null, "a1", null, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a1", null, null, null, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a1 requires input 'dirName' that is not provided");
 
     params.put("dirName", "dirName");
-    actionRequest = new ExecuteActionRequest("c1", null, "a1", null, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a1", null, null, null, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a1 requires explicit target host(s)");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HIVE", null, null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", null, "a2", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a2", "HIVE", null, null, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a2 targets service HIVE that does not match with expected HDFS");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS", "HDFS_CLIENT", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", null, "a2", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a2", "HDFS", "HDFS_CLIENT", null,
params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a2 targets component HDFS_CLIENT that does not match with expected DATANODE");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS2", "HDFS_CLIENT", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", null, "a1", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a1", "HDFS2", "HDFS_CLIENT", null,
params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a1 targets service HDFS2 that does not exist");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS", "HDFS_CLIENT2", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", null, "a1", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a1", "HDFS", "HDFS_CLIENT2", null,
params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a1 targets component HDFS_CLIENT2 that does not exist");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("", "HDFS_CLIENT2", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", null, "a1", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a1", "", "HDFS_CLIENT2", null,
params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a1 targets component HDFS_CLIENT2 without specifying the target service");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("", "", null);
-    resourceFilters.add(resourceFilter);
-
     // targets a service that is not a member of the stack (e.g. MR not in HDP-2)
-    actionRequest = new ExecuteActionRequest("c1", null, "a3", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a3", "", "", null, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Action a3 targets service MAPREDUCE that does not exist");
 
     hosts = new ArrayList<String>();
     hosts.add("h6");
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("", "", hosts);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", null, "a2", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a2", "", "", hosts, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Request specifies host h6 but its not a valid host based on the target service=HDFS
and component=DATANODE");
 
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HIVE", "", null);
-    resourceFilters.add(resourceFilter);
-
-    actionRequest = new ExecuteActionRequest("c1", null, "a4", resourceFilters, params);
+    actionRequest = new ExecuteActionRequest("c1", null, "a4", "HIVE", "", null, params);
     expectActionCreationErrorWithMessage(actionRequest, requestProperties,
         "Suitable hosts not found, component=, service=HIVE, cluster=c1, actionName=a4");
 
   }
 
   private void expectActionCreationErrorWithMessage(ExecuteActionRequest actionRequest,
-                                                    Map<String, String> requestProperties,
-                                                    String message) {
+                                                    Map<String, String> requestProperties,
String message) {
     try {
       RequestStatusResponse response = controller.createAction(actionRequest, requestProperties);
       Assert.fail("createAction should fail");
@@ -4310,9 +4220,7 @@ public class AmbariManagementControllerTest {
     Map<String, String> params = new HashMap<String, String>() {{
       put("test", "test");
     }};
-    ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1", Role.HDFS_SERVICE_CHECK.name(),
params);
-    RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", null, null);
-    actionRequest.getResourceFilters().add(resourceFilter);
+    ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1", Role.HDFS_SERVICE_CHECK.name(),
"HDFS", params);
 
     Map<String, String> requestProperties = new HashMap<String, String>();
     requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
@@ -4341,9 +4249,7 @@ public class AmbariManagementControllerTest {
     assertNull(hostRoleCommand.getCustomCommandName());
 
     assertEquals(task.getTaskId(), hostRoleCommand.getTaskId());
-    assertNotNull(actionRequest.getResourceFilters());
-    RequestResourceFilter requestResourceFilter = actionRequest.getResourceFilters().get(0);
-    assertEquals(resourceFilter.getServiceName(), hostRoleCommand.getExecutionCommandWrapper().getExecutionCommand().getServiceName());
+    assertEquals(actionRequest.getServiceName(), hostRoleCommand.getExecutionCommandWrapper().getExecutionCommand().getServiceName());
     assertEquals(actionRequest.getClusterName(), hostRoleCommand.getExecutionCommandWrapper().getExecutionCommand().getClusterName());
     assertEquals(actionRequest.getCommandName(), hostRoleCommand.getExecutionCommandWrapper().getExecutionCommand().getRole());
     assertEquals(Role.HDFS_CLIENT.name(), hostRoleCommand.getEvent().getEvent().getServiceComponentName());
@@ -4351,10 +4257,7 @@ public class AmbariManagementControllerTest {
     assertNotNull(hostRoleCommand.getExecutionCommandWrapper().getExecutionCommand().getConfigurations());
     assertEquals(2, hostRoleCommand.getExecutionCommandWrapper().getExecutionCommand().getConfigurations().size());
     assertEquals(requestProperties.get(REQUEST_CONTEXT_PROPERTY), stage.getRequestContext());
-
-    actionRequest = new ExecuteActionRequest("c1", Role.MAPREDUCE_SERVICE_CHECK.name(), null);
-    resourceFilter = new RequestResourceFilter("MAPREDUCE", null, null);
-    actionRequest.getResourceFilters().add(resourceFilter);
+    actionRequest = new ExecuteActionRequest("c1", Role.MAPREDUCE_SERVICE_CHECK.name(), "MAPREDUCE",
null);
 
     response = controller.createAction(actionRequest, requestProperties);
 
@@ -5659,9 +5562,8 @@ public class AmbariManagementControllerTest {
     }
     Assert.assertEquals("Expect only one service check.", 1, commandCount);
 
-    RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", null, null);
-    ExecuteActionRequest actionRequest = new ExecuteActionRequest("foo1", Role.HDFS_SERVICE_CHECK.name(),
null);
-    actionRequest.getResourceFilters().add(resourceFilter);
+    ExecuteActionRequest actionRequest = new ExecuteActionRequest("foo1", Role.HDFS_SERVICE_CHECK.name(),
+        null, "HDFS", null, null, null);
     Map<String, String> requestProperties = new HashMap<String, String>();
 
     RequestStatusResponse response = controller.createAction(actionRequest, requestProperties);
@@ -6057,9 +5959,8 @@ public class AmbariManagementControllerTest {
       put("excluded_hosts", "h2");
       put("align_maintenance_state", "true");
     }};
-    RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", "NAMENODE",
null);
-    ExecuteActionRequest request = new ExecuteActionRequest(clusterName, "DECOMMISSION",
params);
-    request.getResourceFilters().add(resourceFilter);
+    ExecuteActionRequest request = new ExecuteActionRequest(clusterName, "DECOMMISSION",
null, "HDFS", "NAMENODE",
+        null, params);
 
     Map<String, String> requestProperties = new HashMap<String, String>();
     requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
@@ -6091,9 +5992,7 @@ public class AmbariManagementControllerTest {
       put("excluded_hosts", "h1");
       put("align_maintenance_state", "true");
     }};
-    resourceFilter = new RequestResourceFilter("HDFS", "NAMENODE", null);
-    request = new ExecuteActionRequest(clusterName, "DECOMMISSION", params);
-    request.getResourceFilters().add(resourceFilter);
+    request = new ExecuteActionRequest(clusterName, "DECOMMISSION", null, "HDFS", "NAMENODE",
null, params);
 
     response = controller.createAction(request,
         requestProperties);
@@ -6134,9 +6033,7 @@ public class AmbariManagementControllerTest {
       put("included_hosts", "h1 , h2");
       put("align_maintenance_state", "true");
     }};
-    resourceFilter = new RequestResourceFilter("HDFS", "NAMENODE", null);
-    request = new ExecuteActionRequest(clusterName, "DECOMMISSION", params);
-    request.getResourceFilters().add(resourceFilter);
+    request = new ExecuteActionRequest(clusterName, "DECOMMISSION", null, "HDFS", "NAMENODE",
null, params);
 
     response = controller.createAction(request,
         requestProperties);
@@ -6171,209 +6068,6 @@ public class AmbariManagementControllerTest {
   }
 
   @Test
-  public void testResourceFiltersWithCustomActions() throws AmbariException {
-    setupClusterWithHosts("c1", "HDP-2.0.6",
-      new ArrayList<String>() {{
-        add("h1");
-        add("h2");
-        add("h3");
-      }},
-      "centos6");
-
-    Cluster cluster = clusters.getCluster("c1");
-    cluster.setDesiredStackVersion(new StackId("HDP-2.0.6"));
-    cluster.setCurrentStackVersion(new StackId("HDP-2.0.6"));
-
-    ConfigFactory cf = injector.getInstance(ConfigFactory.class);
-    Config config1 = cf.createNew(cluster, "global",
-      new HashMap<String, String>() {{
-        put("key1", "value1");
-      }});
-    config1.setVersionTag("version1");
-
-    Config config2 = cf.createNew(cluster, "core-site",
-      new HashMap<String, String>() {{
-        put("key1", "value1");
-      }});
-    config2.setVersionTag("version1");
-
-    cluster.addConfig(config1);
-    cluster.addConfig(config2);
-
-    Service hdfs = cluster.addService("HDFS");
-    hdfs.persist();
-
-    Service mapred = cluster.addService("YARN");
-    mapred.persist();
-
-    hdfs.addServiceComponent(Role.HDFS_CLIENT.name()).persist();
-    hdfs.addServiceComponent(Role.NAMENODE.name()).persist();
-    hdfs.addServiceComponent(Role.DATANODE.name()).persist();
-
-    mapred.addServiceComponent(Role.RESOURCEMANAGER.name()).persist();
-
-    hdfs.getServiceComponent(Role.HDFS_CLIENT.name()).addServiceComponentHost("h1").persist();
-    hdfs.getServiceComponent(Role.NAMENODE.name()).addServiceComponentHost("h1").persist();
-    hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost("h1").persist();
-    hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost("h2").persist();
-
-    controller.getAmbariMetaInfo().addActionDefinition(new ActionDefinition(
-      "a1", ActionType.SYSTEM, "", "HDFS", "", "Some custom action.",
-      TargetHostType.ALL, Short.valueOf("100")));
-
-    Map<String, String> params = new HashMap<String, String>() {{
-      put("test", "test");
-    }};
-
-    Map<String, String> requestProperties = new HashMap<String, String>();
-    requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
-
-    List<RequestResourceFilter> resourceFilters = new ArrayList<RequestResourceFilter>();
-    ArrayList<String> hosts = new ArrayList<String>() {{ add("h2"); }};
-    RequestResourceFilter resourceFilter1 = new RequestResourceFilter("HDFS", "DATANODE",
hosts);
-
-    hosts = new ArrayList<String>() {{ add("h1"); }};
-    RequestResourceFilter resourceFilter2 = new RequestResourceFilter("HDFS", "NAMENODE",
hosts);
-
-    resourceFilters.add(resourceFilter1);
-    resourceFilters.add(resourceFilter2);
-
-    ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1", null, "a1", resourceFilters,
params);
-    RequestStatusResponse response = null;
-    try {
-      response = controller.createAction(actionRequest, requestProperties);
-    } catch (AmbariException ae) {
-      LOG.info("Expected exception.", ae);
-      Assert.assertTrue(ae.getMessage().contains("Custom action definition only " +
-        "allows one resource filter to be specified"));
-    }
-    resourceFilters.remove(resourceFilter1);
-    actionRequest = new ExecuteActionRequest("c1", null, "a1", resourceFilters, params);
-    response = controller.createAction(actionRequest, requestProperties);
-
-    assertEquals(1, response.getTasks().size());
-    HostRoleCommand nnCommand = null;
-
-    for (HostRoleCommand hrc : actionDB.getRequestTasks(response.getRequestId())) {
-      if (hrc.getHostName().equals("h1")) {
-        nnCommand = hrc;
-      }
-    }
-
-    Assert.assertNotNull(nnCommand);
-    ExecutionCommand cmd = nnCommand.getExecutionCommandWrapper().getExecutionCommand();
-    Assert.assertEquals("a1", cmd.getRole());
-    Assert.assertTrue(cmd.getCommandParams().containsKey("test"));
-  }
-
-  @Test
-  public void testResourceFiltersWithCustomCommands() throws AmbariException {
-    setupClusterWithHosts("c1", "HDP-2.0.6",
-      new ArrayList<String>() {{
-        add("h1");
-        add("h2");
-        add("h3");
-      }},
-      "centos6");
-
-    Cluster cluster = clusters.getCluster("c1");
-    cluster.setDesiredStackVersion(new StackId("HDP-2.0.6"));
-    cluster.setCurrentStackVersion(new StackId("HDP-2.0.6"));
-
-    ConfigFactory cf = injector.getInstance(ConfigFactory.class);
-    Config config1 = cf.createNew(cluster, "global",
-      new HashMap<String, String>() {{
-        put("key1", "value1");
-      }});
-    config1.setVersionTag("version1");
-
-    Config config2 = cf.createNew(cluster, "core-site",
-      new HashMap<String, String>() {{
-        put("key1", "value1");
-      }});
-    config2.setVersionTag("version1");
-
-    cluster.addConfig(config1);
-    cluster.addConfig(config2);
-
-    Service hdfs = cluster.addService("HDFS");
-    hdfs.persist();
-
-    Service mapred = cluster.addService("YARN");
-    mapred.persist();
-
-    hdfs.addServiceComponent(Role.HDFS_CLIENT.name()).persist();
-    hdfs.addServiceComponent(Role.NAMENODE.name()).persist();
-    hdfs.addServiceComponent(Role.DATANODE.name()).persist();
-
-    mapred.addServiceComponent(Role.RESOURCEMANAGER.name()).persist();
-
-    hdfs.getServiceComponent(Role.HDFS_CLIENT.name()).addServiceComponentHost("h1").persist();
-    hdfs.getServiceComponent(Role.NAMENODE.name()).addServiceComponentHost("h1").persist();
-    hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost("h1").persist();
-    hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost("h2").persist();
-
-    mapred.getServiceComponent(Role.RESOURCEMANAGER.name()).addServiceComponentHost("h2").persist();
-
-    Map<String, String> params = new HashMap<String, String>() {{
-      put("test", "test");
-    }};
-
-    Map<String, String> requestProperties = new HashMap<String, String>();
-    requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
-
-    // Test multiple restarts
-    List<RequestResourceFilter> resourceFilters = new ArrayList<RequestResourceFilter>();
-    RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS",
-      Role.DATANODE.name(), new ArrayList<String>() {{ add("h1"); add("h2"); }});
-    resourceFilters.add(resourceFilter);
-    resourceFilter = new RequestResourceFilter("YARN",
-      Role.RESOURCEMANAGER.name(), new ArrayList<String>() {{ add("h2"); }});
-    resourceFilters.add(resourceFilter);
-
-    ExecuteActionRequest request = new ExecuteActionRequest("c1",
-      "RESTART", null, resourceFilters, params);
-
-    RequestStatusResponse response = controller.createAction(request, requestProperties);
-    Assert.assertEquals(3, response.getTasks().size());
-    List<HostRoleCommand> storedTasks = actionDB.getRequestTasks(response.getRequestId());
-
-    Assert.assertNotNull(storedTasks);
-    int expectedRestartCount = 0;
-    for (HostRoleCommand hrc : storedTasks) {
-      Assert.assertEquals("RESTART", hrc.getCustomCommandName());
-      if (hrc.getHostName().equals("h1") && hrc.getRole().equals(Role.DATANODE))
{
-        expectedRestartCount++;
-      } else if(hrc.getHostName().equals("h2")) {
-        if (hrc.getRole().equals(Role.DATANODE)) {
-          expectedRestartCount++;
-        } else if (hrc.getRole().equals(Role.RESOURCEMANAGER)) {
-          expectedRestartCount++;
-        }
-      }
-    }
-
-    Assert.assertEquals("Restart 2 datanodes and 1 Resourcemanager.", 3, expectedRestartCount);
-
-    // Test service checks - specific host
-    resourceFilters.clear();
-    resourceFilter = new RequestResourceFilter("HDFS", null,
-      new ArrayList<String>() {{ add("h2"); }});
-    resourceFilters.add(resourceFilter);
-    request = new ExecuteActionRequest("c1", Role.HDFS_SERVICE_CHECK.name(),
-      null, resourceFilters, null);
-    response = controller.createAction(request, requestProperties);
-
-    Assert.assertEquals(1, response.getTasks().size());
-    storedTasks = actionDB.getRequestTasks(response.getRequestId());
-    Assert.assertNotNull(storedTasks);
-    Assert.assertEquals(Role.HDFS_SERVICE_CHECK.name(),
-      storedTasks.get(0).getRole().name());
-    Assert.assertEquals("h2", storedTasks.get(0).getHostName());
-  }
-
-
-  @Test
   public void testConfigsAttachedToServiceChecks() throws AmbariException {
     String clusterName = "foo1";
     createCluster(clusterName);
@@ -6869,9 +6563,8 @@ public class AmbariManagementControllerTest {
       put("test", "test");
       put("excluded_hosts", " h1 ");
     }};
-    RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", "NAMENODE",
null);
-    ExecuteActionRequest request = new ExecuteActionRequest(clusterName, "DECOMMISSION",
params);
-    request.getResourceFilters().add(resourceFilter);
+    ExecuteActionRequest request = new ExecuteActionRequest(clusterName, "DECOMMISSION",
null,
+        "HDFS", "NAMENODE", null, params);
 
     Map<String, String> requestProperties = new HashMap<String, String>();
     requestProperties.put(REQUEST_CONTEXT_PROPERTY, "Called from a test");
@@ -8782,9 +8475,7 @@ public class AmbariManagementControllerTest {
 
       amc.createHostComponents(componentHostRequests);
 
-      RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", null, null);
-      ExecuteActionRequest ar = new ExecuteActionRequest(CLUSTER_NAME, Role.HDFS_SERVICE_CHECK.name(),
null);
-      ar.getResourceFilters().add(resourceFilter);
+      ExecuteActionRequest ar = new ExecuteActionRequest(CLUSTER_NAME, Role.HDFS_SERVICE_CHECK.name(),
"HDFS", null);
       amc.createAction(ar, null);
 
       // change mind, delete the cluster

http://git-wip-us.apache.org/repos/asf/ambari/blob/668d4c26/ambari-server/src/test/java/org/apache/ambari/server/controller/MaintenanceStateHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/MaintenanceStateHelperTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/MaintenanceStateHelperTest.java
index 489499a..3f46ce0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/MaintenanceStateHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/MaintenanceStateHelperTest.java
@@ -28,7 +28,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ambari.server.controller.internal.RequestResourceFilter;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Host;
@@ -94,12 +93,9 @@ public class MaintenanceStateHelperTest {
     map = rpCapture.getValue();
     
     Assert.assertEquals("nagios_update_ignore", ear.getActionName());
-    Assert.assertEquals(null, ear.getCommandName());
-    Assert.assertEquals(1, ear.getResourceFilters().size());
-    RequestResourceFilter resourceFilter = ear.getResourceFilters().get(0);
-
-    Assert.assertEquals("NAGIOS", resourceFilter.getServiceName());
-    Assert.assertEquals("NAGIOS_SERVER", resourceFilter.getComponentName());
+    Assert.assertEquals("ACTIONEXECUTE", ear.getCommandName());
+    Assert.assertEquals("NAGIOS", ear.getServiceName());
+    Assert.assertEquals("NAGIOS_SERVER", ear.getComponentName());
     Assert.assertEquals("c1", ear.getClusterName());
     Assert.assertTrue(map.containsKey("context"));  
   }
@@ -151,11 +147,9 @@ public class MaintenanceStateHelperTest {
     rpCapture.getValue();
     
     Assert.assertEquals("nagios_update_ignore", ear.getActionName());
-    Assert.assertEquals(null, ear.getCommandName());
-    Assert.assertEquals(1, ear.getResourceFilters().size());
-    RequestResourceFilter resourceFilter = ear.getResourceFilters().get(0);
-    Assert.assertEquals("NAGIOS", resourceFilter.getServiceName());
-    Assert.assertEquals("NAGIOS_SERVER", resourceFilter.getComponentName());
+    Assert.assertEquals("ACTIONEXECUTE", ear.getCommandName());
+    Assert.assertEquals("NAGIOS", ear.getServiceName());
+    Assert.assertEquals("NAGIOS_SERVER", ear.getComponentName());
     Assert.assertEquals("c1", ear.getClusterName());
     Assert.assertTrue(map.containsKey("context"));    
   }
@@ -209,11 +203,9 @@ public class MaintenanceStateHelperTest {
     map = rpCapture.getValue();
     
     Assert.assertEquals("nagios_update_ignore", ear.getActionName());
-    Assert.assertEquals(null, ear.getCommandName());
-    Assert.assertEquals(1, ear.getResourceFilters().size());
-    RequestResourceFilter resourceFilter = ear.getResourceFilters().get(0);
-    Assert.assertEquals("NAGIOS", resourceFilter.getServiceName());
-    Assert.assertEquals("NAGIOS_SERVER", resourceFilter.getComponentName());
+    Assert.assertEquals("ACTIONEXECUTE", ear.getCommandName());
+    Assert.assertEquals("NAGIOS", ear.getServiceName());
+    Assert.assertEquals("NAGIOS_SERVER", ear.getComponentName());
     Assert.assertEquals("c1", ear.getClusterName());
     Assert.assertTrue(map.containsKey("context"));
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/668d4c26/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
index d01e2e5..e279342 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
@@ -18,8 +18,6 @@
 
 package org.apache.ambari.server.controller.internal;
 
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.ActionManager;
 import org.apache.ambari.server.actionmanager.HostRoleCommand;
@@ -40,7 +38,6 @@ import org.easymock.Capture;
 import org.junit.Assert;
 import org.junit.Test;
 
-import java.lang.reflect.Type;
 import java.util.*;
 
 import static org.easymock.EasyMock.capture;
@@ -766,20 +763,10 @@ public class RequestResourceProviderTest {
 
     properties.put(RequestResourceProvider.REQUEST_CLUSTER_NAME_PROPERTY_ID, "c1");
 
-    final RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", null,
null);
-    List<RequestResourceFilter> resourceFilters =
-      new ArrayList<RequestResourceFilter>() {{
-        add(resourceFilter);
-      }};
-
-    Type listType = new TypeToken<List<RequestResourceFilter>>(){}.getType();
-    String filterJson = new Gson().toJson(resourceFilters, listType);
-
-    properties.put(RequestResourceProvider.REQUEST_RESOURCE_FILTER_ID, filterJson);
-
     propertySet.add(properties);
 
     Map<String, String> requestInfoProperties = new HashMap<String, String>();
+    requestInfoProperties.put(RequestResourceProvider.SERVICE_NAME_ID, "HDFS");
     requestInfoProperties.put(RequestResourceProvider.COMMAND_ID, "HDFS_SERVICE_CHECK");
 
     // create the request
@@ -790,19 +777,14 @@ public class RequestResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController);
     provider.createResources(request);
-    ExecuteActionRequest capturedRequest = actionRequest.getValue();
-
     Assert.assertTrue(actionRequest.hasCaptured());
-    Assert.assertTrue(capturedRequest.isCommand());
-    Assert.assertEquals(null, capturedRequest.getActionName());
-    Assert.assertEquals("HDFS_SERVICE_CHECK", capturedRequest.getCommandName());
-    Assert.assertNotNull(capturedRequest.getResourceFilters());
-    Assert.assertEquals(1, capturedRequest.getResourceFilters().size());
-    RequestResourceFilter capturedResourceFilter = capturedRequest.getResourceFilters().get(0);
-    Assert.assertEquals("HDFS", capturedResourceFilter.getServiceName());
-    Assert.assertEquals(null, capturedResourceFilter.getComponentName());
-    Assert.assertNotNull(capturedResourceFilter.getHostNames());
-    Assert.assertEquals(0, capturedResourceFilter.getHostNames().size());
+    Assert.assertTrue(actionRequest.getValue().isCommand());
+    Assert.assertEquals(null, actionRequest.getValue().getActionName());
+    Assert.assertEquals("HDFS_SERVICE_CHECK", actionRequest.getValue().getCommandName());
+    Assert.assertEquals("HDFS", actionRequest.getValue().getServiceName());
+    Assert.assertEquals(null, actionRequest.getValue().getComponentName());
+    Assert.assertNotNull(actionRequest.getValue().getHosts());
+    Assert.assertEquals(0, actionRequest.getValue().getHosts().size());
     Assert.assertEquals(0, actionRequest.getValue().getParameters().size());
   }
 
@@ -829,26 +811,13 @@ public class RequestResourceProviderTest {
 
     properties.put(RequestResourceProvider.REQUEST_CLUSTER_NAME_PROPERTY_ID, "c1");
 
-    final RequestResourceFilter resourceFilter = new RequestResourceFilter("HDFS", null,
null);
-    resourceFilter.getHostNames().add("host1");
-    resourceFilter.getHostNames().add("host2");
-    resourceFilter.getHostNames().add("host3");
-    List<RequestResourceFilter> resourceFilters =
-      new ArrayList<RequestResourceFilter>() {{
-        add(resourceFilter);
-      }};
-
-    Type listType = new TypeToken<List<RequestResourceFilter>>(){}.getType();
-    String filterJson = new Gson().toJson(resourceFilters, listType);
-
-    properties.put(RequestResourceProvider.REQUEST_RESOURCE_FILTER_ID, filterJson);
-
     propertySet.add(properties);
 
     Map<String, String> requestInfoProperties = new HashMap<String, String>();
-
+    requestInfoProperties.put(RequestResourceProvider.SERVICE_NAME_ID, "HDFS");
     requestInfoProperties.put("/parameters/param1", "value1");
     requestInfoProperties.put("/parameters/param2", "value2");
+    requestInfoProperties.put(RequestResourceProvider.HOSTS_ID, "host1 ,host2, host3 ");
 
     String[] expectedHosts = new String[]{"host1", "host2", "host3"};
     Map<String, String> expectedParams = new HashMap<String, String>() {{
@@ -883,19 +852,16 @@ public class RequestResourceProviderTest {
 
     provider.createResources(request);
     Assert.assertTrue(actionRequest.hasCaptured());
-    ExecuteActionRequest capturedRequest = actionRequest.getValue();
-    Assert.assertTrue(capturedRequest.isCommand());
-    Assert.assertEquals(null, capturedRequest.getActionName());
-    Assert.assertEquals("HDFS_SERVICE_CHECK", capturedRequest.getCommandName());
-    Assert.assertEquals(1, capturedRequest.getResourceFilters().size());
-    RequestResourceFilter capturedResourceFilter = capturedRequest.getResourceFilters().get(0);
-    Assert.assertEquals("HDFS", capturedResourceFilter.getServiceName());
-    Assert.assertEquals(null, capturedResourceFilter.getComponentName());
-    Assert.assertEquals(3, capturedResourceFilter.getHostNames().size());
-    Assert.assertArrayEquals(expectedHosts, capturedResourceFilter.getHostNames().toArray());
-    Assert.assertEquals(2, capturedRequest.getParameters().size());
+    Assert.assertTrue(actionRequest.getValue().isCommand());
+    Assert.assertEquals(null, actionRequest.getValue().getActionName());
+    Assert.assertEquals("HDFS_SERVICE_CHECK", actionRequest.getValue().getCommandName());
+    Assert.assertEquals("HDFS", actionRequest.getValue().getServiceName());
+    Assert.assertEquals(null, actionRequest.getValue().getComponentName());
+    Assert.assertEquals(3, actionRequest.getValue().getHosts().size());
+    Assert.assertArrayEquals(expectedHosts, actionRequest.getValue().getHosts().toArray());
+    Assert.assertEquals(2, actionRequest.getValue().getParameters().size());
     for(String key : expectedParams.keySet()) {
-      Assert.assertEquals(expectedParams.get(key), capturedRequest.getParameters().get(key));
+      Assert.assertEquals(expectedParams.get(key), actionRequest.getValue().getParameters().get(key));
     }
   }
 }


Mime
View raw message