Bodgy time sensitive test at test/externals/ruby1.8/zlib/test_zlib.rb:317 #618

ghost opened this Issue Mar 31, 2013 · 3 comments


None yet

2 participants

ghost commented Mar 31, 2013

@BanzaiMan wants some more stuff to fix to keep up his commit streak, so here is one ;-)

The following test from test/externals/ruby1.8/zlib/test_zlib.rb:317 sporadically fails:

    def test_mtime
      tim =

      t ="test_zlib_gzip_file")
      t.close do |gz|
        gz.mtime = -1
        gz.mtime = tim
        assert_raise(Zlib::GzipFile::Error) { gz.mtime = }

      f =
      assert_equal(tim.to_i, f.mtime.to_i)

If the writing of the file crosses the seconds boundary, (i.e. writing does not complete within the same second as the call) then it will fail.

@BanzaiMan BanzaiMan was assigned Mar 31, 2013

This puts a new twist to the phrase "time-sensitive tests."


This should fail for MRI, too, depending on the timing.

ghost commented Apr 1, 2013

Yep, it would fail on MRI - it is a crap test.

@kares kares added this to the Won't Fix milestone Jan 10, 2016
@kares kares closed this Jan 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment