about summary refs log tree commit homepage
path: root/test/exec
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-03-10 21:26:14 +0000
committerEric Wong <e@80x24.org>2017-03-14 20:08:06 +0000
commitc0975d0c2faf0f9186399b452cc889ff9259eed6 (patch)
tree3eaa01c718a3e43993cb8567aac50bcd31bbfddc /test/exec
parent4a6a6f88f97e4660597bec4a161eece55b8bba5e (diff)
downloadunicorn-c0975d0c2faf0f9186399b452cc889ff9259eed6.tar.gz
Some versions of test-unit will fail if an unspecified test is
attempted via "-n", so we need to define an empty test.

We cannot use "skip", either, as that seems exclusive to
minitest; and we won't use minitest since it has more
incompatible changes than test-unit over the last 8 years.

The memory leak test is gone since we're more versed in the
Ruby C API nowadays, modern GCs + mallocs may be less
predictable about releasing memory back to the OS.
Diffstat (limited to 'test/exec')
-rw-r--r--test/exec/test_exec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb
index ca0b7bc..4941c4e 100644
--- a/test/exec/test_exec.rb
+++ b/test/exec/test_exec.rb
@@ -97,6 +97,9 @@ run lambda { |env|
   end
 
   def test_sd_listen_fds_emulation
+    # [ruby-core:69895] [Bug #11336] fixed by r51576
+    return if RUBY_VERSION.to_f < 2.3
+
     File.open("config.ru", "wb") { |fp| fp.write(HI) }
     sock = TCPServer.new(@addr, @port)
 
@@ -124,9 +127,7 @@ run lambda { |env|
     end
   ensure
     sock.close if sock
-    # disabled test on old Rubies: https://bugs.ruby-lang.org/issues/11336
-    # [ruby-core:69895] [Bug #11336] fixed by r51576
-  end if RUBY_VERSION.to_f >= 2.3
+  end
 
   def test_inherit_listener_unspecified
     File.open("config.ru", "wb") { |fp| fp.write(HI) }