> On Oct. 18, 2016, 1:39 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java,
> >  line 224
> > <https://reviews.apache.org/r/52987/diff/1/?file=1540555#file1540555line224>
> >
> >     Was this meant to create h3?

No, it was purposfully trying to create another h2, causing a failure. However, 
since objects from the factory are created immediately, going through the 
ServiceComponent object to add hosts takes care of this. See this new code 
below it ...

```
    try {
      sc.addServiceComponentHost("h2");
      fail("Expected error for dups");
    } catch (Exception e) {
      // Expected
    }
```


- Jonathan


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


On Oct. 18, 2016, 8:23 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52987/
> -----------------------------------------------------------
> 
> (Updated Oct. 18, 2016, 8:23 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, Robert Levas, and 
> Sid Wagle.
> 
> 
> Bugs: AMBARI-18614
>     https://issues.apache.org/jira/browse/AMBARI-18614
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> A continuation of AMBARI-18456...
> 
> The {{ServiceComponentHost}} business object should have the following work 
> performed:
> - Remove locking around areas where its no longer required
> - Replace collections with thread-safe concurrent versions
> - Remove some reliance on state-full business objects (caches)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostConfig.java 
> fc22ba5 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
>  586134c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
>  5566343 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
>  a6f5040 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java
>  dcffece 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
>  cd41929 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java
>  c4d735d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
>  b082145 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
>  7b3f671 
>   ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java 
> 43de27f 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java 
> fffda6c 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
>  6d19113 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
>  60027c2 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
>  59bb393 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
>  fa5491e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java
>  ca12826 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
>  64d8184 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
>  3e526d9 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
>  9e285c6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
>  fbed6e2 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
>  bb55597 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
>  48279af 
> 
> Diff: https://reviews.apache.org/r/52987/diff/
> 
> 
> Testing
> -------
> 
> Tests run: 4688, Failures: 0, Errors: 0, Skipped: 42
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 22:28 min
> [INFO] Finished at: 2016-10-17T18:20:53-04:00
> [INFO] Final Memory: 53M/475M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>

Reply via email to