-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46797/
-----------------------------------------------------------

(Updated April 29, 2016, 8:41 a.m.)


Review request for Ambari, Nate Cole and Sid Wagle.


Bugs: AMBARI-16082
    https://issues.apache.org/jira/browse/AMBARI-16082


Repository: ambari


Description
-------

Recent changes to the AmbariManagementControllerTest began reusing the same 
database for all test cases. This significantly dropped the test time from 5+ 
minutes to about 40 seconds. 

However, there is a very bad anti-pattern in our code which caused a different, 
static Injector to live inside of the ExecutionCommandWrapper. We should be 
utilizing proper Guice factory patterns here to create instances of injected 
objects.


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
 52febc4 
  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperFactory.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleCommand.java
 83fa6b9 
  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleCommandFactoryImpl.java
 cf1e989 
  ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java 
5a313d8 
  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/StageFactoryImpl.java
 9ee7c16 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 91d6b4d 
  
ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
 df033d1 
  
ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
 6cb9e6f 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CalculatedStatusTest.java
 46c0b03 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TaskResourceProviderTest.java
 91cfef8 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderHDP22Test.java
 a9c4b17 
  
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AutoSkipFailedSummaryActionTest.java
 5e35b301 
  
ambari-server/src/test/java/org/apache/ambari/server/utils/StageUtilsTest.java 
215d137 

Diff: https://reviews.apache.org/r/46797/diff/


Testing (updated)
-------

mvn clean test

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:32 h
[INFO] Finished at: 2016-04-29T00:42:28-04:00
[INFO] Final Memory: 42M/791M
[INFO] ------------------------------------------------------------------------


Thanks,

Jonathan Hurley

Reply via email to