about summary refs log tree commit homepage
path: root/test/exec
diff options
context:
space:
mode:
authorbofh@yhbt.net <bofh@yhbt.net>2021-03-14 23:17:24 +0000
committerEW <bofh@yhbt.net>2021-03-15 06:02:52 +0000
commitea5295e8e4dcfaec24efb5030557594aabe645cb (patch)
tree520c0c0ef489ebeaa024bd20bff0c7594b849b79 /test/exec
parent89b4ea15506ada542ab218c6819cf236e0afb2a2 (diff)
downloadunicorn-ea5295e8e4dcfaec24efb5030557594aabe645cb.tar.gz
Otherwise we get test failures since we use sysread
and syswrite in many places
Diffstat (limited to 'test/exec')
-rw-r--r--test/exec/test_exec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb
index 32734c1..aacd917 100644
--- a/test/exec/test_exec.rb
+++ b/test/exec/test_exec.rb
@@ -574,7 +574,7 @@ EOF
     assert_equal String, results[0].class
     worker_pid = results[0].to_i
     assert_not_equal pid, worker_pid
-    s = UNIXSocket.new(tmp.path)
+    s = unix_socket(tmp.path)
     s.syswrite("GET / HTTP/1.0\r\n\r\n")
     results = ''
     loop { results << s.sysread(4096) } rescue nil
@@ -732,7 +732,7 @@ EOF
     wait_for_file(sock_path)
     assert File.socket?(sock_path)
 
-    sock = UNIXSocket.new(sock_path)
+    sock = unix_socket(sock_path)
     sock.syswrite("GET / HTTP/1.0\r\n\r\n")
     results = sock.sysread(4096)
 
@@ -742,7 +742,7 @@ EOF
     wait_for_file(sock_path)
     assert File.socket?(sock_path)
 
-    sock = UNIXSocket.new(sock_path)
+    sock = unix_socket(sock_path)
     sock.syswrite("GET / HTTP/1.0\r\n\r\n")
     results = sock.sysread(4096)
 
@@ -777,7 +777,7 @@ EOF
     assert_equal pid, File.read(pid_file).to_i
     assert File.socket?(sock_path), "socket created"
 
-    sock = UNIXSocket.new(sock_path)
+    sock = unix_socket(sock_path)
     sock.syswrite("GET / HTTP/1.0\r\n\r\n")
     results = sock.sysread(4096)
 
@@ -803,7 +803,7 @@ EOF
     wait_for_file(new_sock_path)
     assert File.socket?(new_sock_path), "socket exists"
     @sockets.each do |path|
-      sock = UNIXSocket.new(path)
+      sock = unix_socket(path)
       sock.syswrite("GET / HTTP/1.0\r\n\r\n")
       results = sock.sysread(4096)
       assert_equal String, results.class