> On Sept. 7, 2017, 11:34 p.m., Jared Stewart wrote:
> > geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java
> > Lines 107 (patched)
> > <https://reviews.apache.org/r/62179/diff/1/?file=1818168#file1818168line109>
> >
> >     How do you think this reads this instead of the `for` loop? 
> >     ```
> >         Consumer<MemberVM> stopMemberAndDisconnectDS = (MemberVM memberVM) 
> > -> {
> >           memberVM.stopMember();
> >           memberVM.getVM().invoke((SerializableRunnableIF) 
> > MemberStarterRule::disconnectDSIfAny);
> >         };
> >         
> >         
> > Arrays.stream(members).filter(Objects::nonNull).forEach(stopMemberAndDisconnectDS);
> >     ```

this way, we are still only calling disconnectDSIfAny() when the members 
element is not null. When a VM is used only as a client, the members[] won't 
contain that VM at all, because it only contains the ServerVM and LocatorVM.


- Jinmei


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


On Sept. 7, 2017, 11:12 p.m., Jinmei Liao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62179/
> -----------------------------------------------------------
> 
> (Updated Sept. 7, 2017, 11:12 p.m.)
> 
> 
> Review request for geode, Jared Stewart, Ken Howe, Kirk Lund, and Patrick 
> Rhomberg.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Test Rule Fix: clean up clientVM if using LocatorServerStartUpRule to get the 
> ClientVM
> 
> 
> Diffs
> -----
> 
>   
> geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java
>  f0385e21f708d9a085e7129d82fb3101e2fb8322 
>   
> geode-core/src/test/java/org/apache/geode/test/dunit/rules/MemberStarterRule.java
>  a832a2590527100afc05fb9de2e332a263d52c19 
> 
> 
> Diff: https://reviews.apache.org/r/62179/diff/1/
> 
> 
> Testing
> -------
> 
> precheckin running
> 
> 
> Thanks,
> 
> Jinmei Liao
> 
>

Reply via email to