Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8093

Some tests miss subscribed event because expectation is set after event fires.

    XMLWordPrintableJSON

Details

    • Mesosphere Sprint 67
    • 2

    Description

      Tests

      CgroupsIsolatorTest.ROOT_CGROUPS_LimitSwap
      DefaultExecutorCniTest.ROOT_VerifyContainerIP
      DockerRuntimeIsolatorTest.ROOT_INTERNET_CURL_NestedSimpleCommand
      DockerRuntimeIsolatorTest.ROOT_NestedDockerDefaultCmdLocalPuller
      DockerRuntimeIsolatorTest.ROOT_NestedDockerDefaultEntryptLocalPuller
      

      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 the expectation before a connection is attempted, see https://github.com/apache/mesos/blob/1c51c98638bb9ea0e8ec6a3f284b33d6c1a4e8ef/src/tests/default_executor_tests.cpp#L139-L159.

      Attachments

        Issue Links

          Activity

            People

              ArmandGrillet Armand Grillet
              alexr Alex R
              Alex R Alex R
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: