fix(pytest): Add master restart delay (#909)

- Add restart delay to master in crashing master test
- Add process check after force shutdown
- Increase time limit to 45 min
This commit is contained in:
Vladislav 2023-03-06 00:16:57 +03:00 committed by GitHub
parent 0196589786
commit 7cb2232edc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -14,7 +14,7 @@ jobs:
# Test of these containers
container: ["ubuntu-dev:20"]
build-type: [Debug, Release]
timeout-minutes: 30
timeout-minutes: 45
container:
image: ghcr.io/romange/${{ matrix.container }}

View file

@ -52,6 +52,7 @@ class DflyInstance:
except subprocess.TimeoutExpired:
print("Unable to terminate DragonflyDB gracefully, it was killed")
proc.kill()
proc.communicate()
def _start(self):
base_args = [f"--{v}" for v in self.params.args]

View file

@ -297,6 +297,7 @@ async def test_disconnect_master(df_local_factory, df_seeder_factory, t_master,
master.stop(kill=True)
async def start_master():
await asyncio.sleep(0.2)
master.start()
c_master = aioredis.Redis(port=master.port)
assert await c_master.ping()