You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Alexander Rukletsov (JIRA)" <ji...@apache.org> on 2017/10/14 06:04:00 UTC

[jira] [Updated] (MESOS-8093) Some tests miss subscribed event because expectation is set after event fires.

     [ https://issues.apache.org/jira/browse/MESOS-8093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Rukletsov updated MESOS-8093:
---------------------------------------
    Attachment: ROOT_INTERNET_CURL_NestedSimpleCommand-badrun-excerpt.txt

> Some tests miss subscribed event because expectation is set after event fires.
> ------------------------------------------------------------------------------
>
>                 Key: MESOS-8093
>                 URL: https://issues.apache.org/jira/browse/MESOS-8093
>             Project: Mesos
>          Issue Type: Bug
>          Components: scheduler driver, test
>            Reporter: Alexander Rukletsov
>            Assignee: Gilbert Song
>              Labels: flaky-tets, mesosphere
>         Attachments: ROOT_INTERNET_CURL_NestedSimpleCommand-badrun-excerpt.txt
>
>
> Tests
> {noformat}
> CgroupsIsolatorTest.ROOT_CGROUPS_LimitSwap
> DefaultExecutorCniTest.ROOT_VerifyContainerIP
> DockerRuntimeIsolatorTest.ROOT_INTERNET_CURL_NestedSimpleCommand
> DockerRuntimeIsolatorTest.ROOT_NestedDockerDefaultCmdLocalPuller
> DockerRuntimeIsolatorTest.ROOT_NestedDockerDefaultEntryptLocalPuller
> {noformat}
> all have the same problem. They initiate a scheduler subscribe call in reaction to {{connected}} event. However, an expectation for {{subscribed}} event is created _afterwards_, which might lead to an uninteresting mock function call for {{subscribed}} followed by a failure to wait for {{subscribed}}, see attached log excerpt for more details. Problematic code is here: https://github.com/apache/mesos/blob/1c51c98638bb9ea0e8ec6a3f284b33d6c1a4e8ef/src/tests/containerizer/runtime_isolator_tests.cpp#L593-L615
> A possible solution is to await for {{subscribed}} only, without {{connected}}, setting un the expectation before a connection is attempted, see https://github.com/apache/mesos/blob/1c51c98638bb9ea0e8ec6a3f284b33d6c1a4e8ef/src/tests/default_executor_tests.cpp#L139-L159.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)