[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

APR hash order ruby test failure

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 22 Mar 2012 11:41:26 +0000

There is another failure in the ruby testsuite:

http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/4626

  1) Failure:
test_changelists_get_with_block(SvnClientTest)
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2296:in `assert_changelists'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2288:in `assert_changelists'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2349:in `test_changelists_get_with_block':
<{nil=>
  ["/tmp/d20120322-8616-qtl2ah/wc",
   "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt",
   "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt"]}> expected but was
<{nil=>
  ["/tmp/d20120322-8616-qtl2ah/wc",
   "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt",
   "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt"]}>.

The failing code is:

    make_context(log) do |ctx|
      File.open(path1, "w") {|f| f.print(src)}
      File.open(path2, "w") {|f| f.print(src)}
      ctx.add(path1)
      ctx.add(path2)
      ctx.commit(@wc_path)

      assert_equal({}, yield(ctx, changelist1))
      assert_equal({nil=>[@wc_path,path1,path2].map{|f| File.expand_path(f)}}, yield(ctx, nil))

This is likely to be APR's new hash randomisation which means that the
notification order of "hello1.txt" and "hello2.txt" is unpredictable. I
think the fix is for the lists to be sorted but I don't know the
necessary Ruby.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2012-03-22 12:42:04 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.