[DRE-commits] [ruby-eventmachine] 01/02: Disable flaky inoty test

zeha at debian.org zeha at debian.org
Mon Jan 23 00:40:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

zeha pushed a commit to branch stretch
in repository ruby-eventmachine.

commit a96cfa4e2c6efefa40729c3c33452070bf96db43
Author: Christian Hofstaedtler <zeha at debian.org>
Date:   Mon Jan 23 00:36:32 2017 +0000

    Disable flaky inoty test
    
    Closes: #831244
---
 debian/patches/disable-inotify-test | 70 +++++++++++++++++++++++++++++++++++++
 debian/patches/series               |  1 +
 2 files changed, 71 insertions(+)

diff --git a/debian/patches/disable-inotify-test b/debian/patches/disable-inotify-test
new file mode 100644
index 0000000..c9a161d
--- /dev/null
+++ b/debian/patches/disable-inotify-test
@@ -0,0 +1,70 @@
+Index: ruby-eventmachine/tests/test_file_watch.rb
+===================================================================
+--- ruby-eventmachine.orig/tests/test_file_watch.rb
++++ /dev/null
+@@ -1,65 +0,0 @@
+-require 'em_test_helper'
+-require 'tempfile'
+-
+-class TestFileWatch < Test::Unit::TestCase
+-  if windows?
+-    def test_watch_file_raises_unsupported_error
+-      assert_raises(EM::Unsupported) do
+-        EM.run do
+-          file = Tempfile.new("fake_file")
+-          EM.watch_file(file.path)
+-        end
+-      end
+-    end
+-  elsif EM.respond_to? :watch_filename
+-    module FileWatcher
+-      def file_modified
+-        $modified = true
+-      end
+-      def file_deleted
+-        $deleted = true
+-      end
+-      def unbind
+-        $unbind = true
+-        EM.stop
+-      end
+-    end
+-
+-    def setup
+-      EM.kqueue = true if EM.kqueue?
+-    end
+-
+-    def teardown
+-      EM.kqueue = false if EM.kqueue?
+-    end
+-
+-    def test_events
+-      EM.run{
+-        file = Tempfile.new('em-watch')
+-        $tmp_path = file.path
+-
+-        # watch it
+-        watch = EM.watch_file(file.path, FileWatcher)
+-        $path = watch.path
+-
+-        # modify it
+-        File.open(file.path, 'w'){ |f| f.puts 'hi' }
+-
+-        # delete it
+-        EM.add_timer(0.01){ file.close; file.delete }
+-      }
+-
+-      assert_equal($path, $tmp_path)
+-      assert($modified)
+-      assert($deleted)
+-      assert($unbind)
+-    end
+-  else
+-    warn "EM.watch_file not implemented, skipping tests in #{__FILE__}"
+-
+-    # Because some rubies will complain if a TestCase class has no tests
+-    def test_em_watch_file_unsupported
+-      assert true
+-    end
+-  end
+-end
diff --git a/debian/patches/series b/debian/patches/series
index 0caa358..10aa88c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 skip_tests_using_network.patch
 disable_broken_patch_upstream_issue_575
+disable-inotify-test

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-eventmachine.git



More information about the Pkg-ruby-extras-commits mailing list