geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jinmei Liao <jil...@pivotal.io>
Subject Re: Review Request 58518: GEODE-2795: Clean up DUnit VMs after dynamically changing 'user.dir'
Date Sat, 22 Apr 2017 00:50:47 GMT

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




geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java
Line 73 (original), 69 (patched)
<https://reviews.apache.org/r/58518/#comment245775>

    Why 8?



geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java
Line 81 (original), 77 (patched)
<https://reviews.apache.org/r/58518/#comment245777>

    If the stopMemberAndboundVMIfNecessary(maybe just rename is cleanUp?) is in MemberVM,
then in the after(), we can just do:
    
    Arrays.stream(members).forEach(MemberVM::cleanUp);
    
    and in stopMember(int index), we can just do:
    members[index].cleanUp();



geode-core/src/test/java/org/apache/geode/test/dunit/rules/MemberVM.java
Lines 73 (patched)
<https://reviews.apache.org/r/58518/#comment245776>

    I think I prefer to have this cleanUpVM in this class instead of VM, since LocatorServerStartupRule
is the one that overwrites this user.dir. Feels kind of weired that a method in VM will need
to refer to a method in a specifid rule (LocatorServerStartupRule)


- Jinmei Liao


On April 21, 2017, 10:34 p.m., Jared Stewart wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58518/
> -----------------------------------------------------------
> 
> (Updated April 21, 2017, 10:34 p.m.)
> 
> 
> Review request for geode, Jinmei Liao, Ken Howe, and Kirk Lund.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> GEODE-2795: Clean up DUnit VMs after dynamically changing 'user.dir'
> 
> - LocatorServerStarterRule will now always bounce the DUnit VMs in after() to prevent
corrupted cached values of `System.getProperty('user.dir')` that refer to a temporary folder
which no longer exists.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/test/java/org/apache/geode/management/ConnectToLocatorSSLDUnitTest.java
1033b6c 
>   geode-core/src/test/java/org/apache/geode/management/JMXMBeanDUnitTest.java ebc3f17

>   geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandRedeployDUnitTest.java
d47b343 
>   geode-core/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigTestBase.java
c5aaa74 
>   geode-core/src/test/java/org/apache/geode/test/dunit/VM.java 0b188ae 
>   geode-core/src/test/java/org/apache/geode/test/dunit/rules/CleanupDUnitVMsRule.java
PRE-CREATION 
>   geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java
34506c4 
> 
> 
> Diff: https://reviews.apache.org/r/58518/diff/3/
> 
> 
> Testing
> -------
> 
> Precheckin started (still running)
> 
> 
> Thanks,
> 
> Jared Stewart
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message