From 03f6d843be09589da11397ff0ff92d04499de714 Mon Sep 17 00:00:00 2001 From: Jaehoon You Date: Wed, 14 Jun 2017 12:21:11 +0900 Subject: [PATCH] percona-server: avoid overwrite socket files when running test Signed-off-by: Jaehoon You Closes #13957. Signed-off-by: Alex Dunn --- Formula/percona-server.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Formula/percona-server.rb b/Formula/percona-server.rb index c1eb2495135..17b858e2812 100644 --- a/Formula/percona-server.rb +++ b/Formula/percona-server.rb @@ -184,12 +184,12 @@ class PerconaServer < Formula # mysql throws error if any file exists in the data directory system "#{bin}/mysqld", "--log-error-verbosity=3", "--initialize-insecure", "--datadir=#{testpath}/mysql", "--user=#{ENV["USER"]}" pid = fork do - exec "#{opt_bin}/mysqld_safe", "--datadir=#{testpath}/mysql", "--user=#{ENV["USER"]}", "--bind-address=127.0.0.1", "--port=3307" + exec "#{opt_bin}/mysqld_safe", "--datadir=#{testpath}/mysql", "--user=#{ENV["USER"]}", "--bind-address=127.0.0.1", "--port=3307", "--socket=#{testpath}/mysql.sock" end sleep 3 - system "#{bin}/mysql", "--verbose", "--port=3307", "--user=root", "--execute=source #{testpath/"mysql_test.sql"}" + system "#{bin}/mysql", "--verbose", "--host=127.0.0.1", "--port=3307", "--user=root", "--execute=source #{testpath/"mysql_test.sql"}" ensure - system "#{bin}/mysqladmin", "shutdown", "--user=root", "--port=3307" + system "#{bin}/mysqladmin", "shutdown", "--user=root", "--host=127.0.0.1", "--port=3307" Process.wait pid end end