Changeset 65e66c9 in mod_gnutls for test/mgstest/services.py


Ignore:
Timestamp:
Nov 28, 2020, 3:46:31 PM (8 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
asyncio, master
Children:
12ed912
Parents:
7eb4233
Message:

Turn "service ready" check functions into coroutines

This way checks that call subprocesses don't block other tasks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/mgstest/services.py

    r7eb4233 r65e66c9  
    5151            self.process_env = None
    5252
    53         # check: function to check if the service is up and working
     53        # check: coroutine to check if the service is up and working
    5454        self.check = check
    5555
     
    123123            if self.process and self.process.returncode is not None:
    124124                return self.process.returncode
    125             if self.check():
     125            if await self.check():
    126126                return None
    127127            else:
     
    181181        return self.config.is_file()
    182182
    183     def pidfile_check(self):
     183    async def pidfile_check(self):
    184184        """Default check method for ApacheService, waits for the PID file to
    185185        be present."""
Note: See TracChangeset for help on using the changeset viewer.