mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaston Kleiman <gas...@mesosphere.io>
Subject Re: Review Request 65278: Fixed a race in the test `ROOT_MultiTaskgroupSharePidNamespace`.
Date Tue, 23 Jan 2018 19:31:24 GMT

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


Fix it, then Ship it!





src/tests/default_executor_tests.cpp
Lines 1854-1855 (patched)
<https://reviews.apache.org/r/65278/#comment275584>

    I'd change the condition to:
    
    ```
     !(strings::trim(pidNamespace1.get()).empty()) &&
     !(strings::trim(pidNamespace2.get()).empty())
    ```
    
    That way the test will fail fast if both files have different pid namespace paths.


- Gaston Kleiman


On Jan. 22, 2018, 6:09 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65278/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2018, 6:09 p.m.)
> 
> 
> Review request for mesos and Gilbert Song.
> 
> 
> Bugs: MESOS-8305
>     https://issues.apache.org/jira/browse/MESOS-8305
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In the test `DefaultExecutorTest.ROOT_MultiTaskgroupSharePidNamespace`,
> we read the file `ns` in each of the two task's sandbox and check if
> their contents (the pid namespace of the task itself) are same. However
> it is possible we do the read for the second task after that file is
> created but before it is written, i.e., the content we read from the
> `ns` file of the second task would be empty which will cause the check
> failed.
> 
> In this patch, we read the file `ns` for each task in a while loop, and
> only break from the loop when we find their contents are same.
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 065eae665db08b39aef70325cebc2753beb30d96 
> 
> 
> Diff: https://reviews.apache.org/r/65278/diff/1/
> 
> 
> Testing
> -------
> 
> Manually ran this test repeatedly (100 times).
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


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