kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH 0/2] fix some test failures/warnings with newer Rubies
@ 2019-12-14 17:58 Eric Wong
  2019-12-14 17:58 ` [PATCH 1/2] test_connect_fd_leak: do not close socket if non-existent Eric Wong
  2019-12-14 17:58 ` [PATCH 2/2] test_syssend: avoid warning on cleanup Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2019-12-14 17:58 UTC (permalink / raw)
  To: kgio-public

Newer rubies are pickier...

Eric Wong (2):
  test_connect_fd_leak: do not close socket if non-existent
  test_syssend: avoid warning on cleanup

 test/test_connect_fd_leak.rb | 2 +-
 test/test_syssend.rb         | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] test_connect_fd_leak: do not close socket if non-existent
  2019-12-14 17:58 [PATCH 0/2] fix some test failures/warnings with newer Rubies Eric Wong
@ 2019-12-14 17:58 ` Eric Wong
  2019-12-14 17:58 ` [PATCH 2/2] test_syssend: avoid warning on cleanup Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2019-12-14 17:58 UTC (permalink / raw)
  To: kgio-public

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

diff --git a/test/test_connect_fd_leak.rb b/test/test_connect_fd_leak.rb
index 034fe5b..b1326f3 100644
--- a/test/test_connect_fd_leak.rb
+++ b/test/test_connect_fd_leak.rb
@@ -13,6 +13,6 @@ class TestConnectFDLeak < Test::Unit::TestCase
       sock = Kgio::UNIXSocket.new(path)
     rescue Errno::ENOENT
     end while (nr += 1) < 10000
-    sock.close
+    sock.close if sock
   end
 end

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] test_syssend: avoid warning on cleanup
  2019-12-14 17:58 [PATCH 0/2] fix some test failures/warnings with newer Rubies Eric Wong
  2019-12-14 17:58 ` [PATCH 1/2] test_connect_fd_leak: do not close socket if non-existent Eric Wong
@ 2019-12-14 17:58 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2019-12-14 17:58 UTC (permalink / raw)
  To: kgio-public

We don't want to clutter up logs with warnings for cross-thread
IO#close
---
 test/test_syssend.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/test_syssend.rb b/test/test_syssend.rb
index 7d2511a..a722462 100644
--- a/test/test_syssend.rb
+++ b/test/test_syssend.rb
@@ -37,6 +37,8 @@ class TestKgioSyssend < Test::Unit::TestCase
     # blocking
     th = Thread.new { loop { acc.kgio_syssend("ZZZZ", 0) } }
     assert_nil th.join(0.1)
+    th.kill
+    assert th.join(10), 'thread should be killed'
   ensure
     [ srv, acc, client ].each { |io| io.close if io }
   end

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-14 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-14 17:58 [PATCH 0/2] fix some test failures/warnings with newer Rubies Eric Wong
2019-12-14 17:58 ` [PATCH 1/2] test_connect_fd_leak: do not close socket if non-existent Eric Wong
2019-12-14 17:58 ` [PATCH 2/2] test_syssend: avoid warning on cleanup Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/kgio.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).