Uploaded image for project: 'DC/OS'
  1. DC/OS
  2. DCOS_OSS-3479

Lots of ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6... when running dcos-integration-test

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: testing
    • Labels:
      None

      Description

      Change: Pytest 3.1 now vomits warnings: https://docs.pytest.org/en/latest/warnings.html

      Issue: dcos-integration-tests passes but now has a LOT of ResourceWarnings about unclosed sockets – enough that teamcity doesn't display all the build log now by default to prevent browser freeze. E.g. (test from the PR that bumped pytest) https://teamcity.mesosphere.io/viewLog.html?tab=buildLog&logTab=tree&filter=debug&expand=all&buildId=994590&_focus=1377

      This warning comes up even on test_dcos_cluster_is_up.

      We updated to 3.1 in this PR https://github.com/dcos/dcos/pull/2580 which landed on this train https://github.com/dcos/dcos/pull/2603. This train's aws cf simple test is the first one in master to have 'warnings summary' and the ResourceWarnings. The marathon bump PR on the same train does not have 'warnings summary' or all the ResourceWarnings: https://teamcity.mesosphere.io/viewLog.html?buildId=996368&buildTypeId=DcOs_Open_Test_IntegrationTest_AwsCloudFormationSimple&tab=buildLog)

      A lot of these come up when the clean_marathon_state fixture is called https://github.com/dcos/dcos/blob/3251c407b48f21292dd1d43a4c40fc207bf5add8/packages/dcos-integration-test/extra/conftest.py#L56-L60 which is using this purge method https://github.com/dcos/dcos-test-utils/blob/f6cf9d809f0ef76392ec99c1fb100c4611df3cea/dcos_test_utils/marathon.py#L307-L321 but I'm not sure what part is actually leaving the sockets open or how long this has been like this (since this was only noticed after the pytest upgrade).

        Attachments

          Activity

            People

            • Assignee:
              cartergawron Carter Gawron
              Reporter:
              margaretsy Margaret Sy (Inactive)
              Team:
              Dev Prod Team
              Watchers:
              Carter Gawron, Colin Creeden, Margaret Sy (Inactive), Yishan Lin (Inactive)
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: