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

Test-only libprocess reinitialization

    XMLWordPrintableJSON

Details

    • Epic
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • libprocess, test
    • libprocess-finalize
    • 3

    Description

      Background
      Libprocess initialization includes the spawning of a variety of global processes and the creation of the server socket which listens for incoming requests. Some properties of the server socket are configured via environment variables, such as the IP and port or the SSL configuration.

      In the case of tests, libprocess is initialized once per test binary. This means that testing different configurations (SSL in particular) is cumbersome as a separate process would be needed for every test case.

      Proposal

      1. Add some optional code between some tests like:
        // Cleanup all of libprocess's state, as if we're starting anew.
        process::finalize(); 
        
        // For tests that need to test SSL connections with the Master:
        openssl::reinitialize();
        
        process::initialize();
        

        See MESOS-3863 for more on process::finalize.

      Attachments

        Issue Links

          Activity

            People

              kaysoky Joseph Wu
              kaysoky Joseph Wu
              Joris Van Remoortere Joris Van Remoortere
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: