librelist archives

« back to archive

[PATCH] test_epoll: switch test_dup_and_fork to exit!

[PATCH] test_epoll: switch test_dup_and_fork to exit!

From:
Eric Wong
Date:
2013-10-19 @ 08:46
exit! is preferable for forked processes in tests since
exit may fire at_exit handlers for tests depending on
which test suite or version of Ruby is loaded.

This was problematic in minitest 5.0.8 but not 4.3.2
---
 Note: we already use exit! in many places in tests

 test/test_epoll.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test_epoll.rb b/test/test_epoll.rb
index ed67988..88d0b6c 100644
--- a/test/test_epoll.rb
+++ b/test/test_epoll.rb
@@ -52,7 +52,7 @@ class TestEpoll < Testcase
     @ep.close
     assert ! epdup.closed?
     pid = fork do
-      exit(!epdup.closed? && @ep.closed?)
+      exit!(!epdup.closed? && @ep.closed?)
     end
     _, status = Process.waitpid2(pid)
     assert status.success?, status.inspect
-- 
1.8.4.483.g7fe67e6.dirty