From da0ef84c0c5b5b5ffe739939895bc1992fac7d80 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 25 Apr 2017 17:26:52 -0400 Subject: [PATCH] mysql test: use OpenPort check over blind sleep --- nixos/tests/mysql-replication.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/tests/mysql-replication.nix b/nixos/tests/mysql-replication.nix index b20bce8edce..82ee76f6b3a 100644 --- a/nixos/tests/mysql-replication.nix +++ b/nixos/tests/mysql-replication.nix @@ -56,11 +56,13 @@ in testScript = '' $master->start; $master->waitForUnit("mysql"); + $master->waitForOpenPort(3306); $slave1->start; $slave2->start; $slave1->waitForUnit("mysql"); + $slave1->waitForOpenPort(3306); $slave2->waitForUnit("mysql"); - $slave2->sleep(100); # Hopefully this is long enough!! + $slave2->waitForOpenPort(3306); $slave2->succeed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4"); ''; })