[
https://issues.apache.org/jira/browse/MESOS-8305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16337043#comment-16337043
]
Qian Zhang commented on MESOS-8305:
-----------------------------------
commit 180129dbd2cc2d8e130e860a4de30d211a69f6be
Author: Qian Zhang
Date: Tue Jan 23 08:33:03 2018 +0800
Fixed a race in the test `ROOT_MultiTaskgroupSharePidNamespace`.
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 both task's files are not empty.
Review: https://reviews.apache.org/r/65278
> DefaultExecutorTest.ROOT_MultiTaskgroupSharePidNamespace is flaky.
> ------------------------------------------------------------------
>
> Key: MESOS-8305
> URL: https://issues.apache.org/jira/browse/MESOS-8305
> Project: Mesos
> Issue Type: Bug
> Environment: Ubuntu 16.04
> Fedora 23
> Reporter: Alexander Rukletsov
> Assignee: Qian Zhang
> Priority: Major
> Labels: flaky-test
> Fix For: 1.6.0
>
> Attachments: ROOT_MultiTaskgroupSharePidNamespace-badrun.txt
>
>
> On Ubuntu 16.04:
> {noformat}
> ../../src/tests/default_executor_tests.cpp:1877
> Expected: strings::trim(pidNamespace1.get())
> Which is: "4026532250"
> To be equal to: strings::trim(pidNamespace2.get())
> Which is: ""
> {noformat}
> Full log attached.
> On Fedora 23:
> {noformat}
> ../../src/tests/default_executor_tests.cpp:1878
> Expected: strings::trim(pidNamespace1.get())
> Which is: "4026532233"
> To be equal to: strings::trim(pidNamespace2.get())
> Which is: ""
> {noformat}
> The test became flaky shortly after MESOS-7306 has been committed and likely
> related to it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)