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

Re: svn commit: r1154908 - /subversion/trunk/subversion/bindings/swig/ruby/test/util.rb

From: Stefan Sperling <stsp_at_apache.org>
Date: Mon, 8 Aug 2011 12:48:02 +0200

On Mon, Aug 08, 2011 at 10:32:55AM -0000, stsp_at_apache.org wrote:
> Author: stsp
> Date: Mon Aug 8 10:32:54 2011
> New Revision: 1154908
> URL: http://svn.apache.org/viewvc?rev=1154908&view=rev
> Log:
> * subversion/bindings/swig/ruby/test/util.rb
> (setup_svnserve): Wait more time for svnserve to gets its marbles together.
> I've started getting spurious test failures in the ruby bindings again
> because of 'connection refused to' errors. I've tried various
> increments (0.2, 0.5, 1), and waiting for an entire second seemed to be
> the only way of producing solid results. This increases run time of
> the ruby tests quite a bit. But it is still dwarfed by the overall run
> time of the test suite so I hope this is acceptable.

This may need a better long-term solution.

There is still an inherent race in the current approach.
Results of our test suite should not hinge on race condititions.
The ruby tests shouldn't invoke svnserve once per test but start one
svnserve instance that all tests will use.

One aditional problem I noticed is that is it impossible to run two
instances of ruby bindings tests on the same machine without test failures.
There were errors thrown from sqlite -- it seems that there is some shared
state between different instances of these tests, and that smells very wrong.

Both problems are probably fairly trivial to fix for someone versed in Ruby.
I am not, so I'm mentioning this here in case someone wants to scratch
this itch before I find some time to learn Ruby myself :)

> Modified:
> subversion/trunk/subversion/bindings/swig/ruby/test/util.rb
> Modified: subversion/trunk/subversion/bindings/swig/ruby/test/util.rb
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/ruby/test/util.rb?rev=1154908&r1=1154907&r2=1154908&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/bindings/swig/ruby/test/util.rb (original)
> +++ subversion/trunk/subversion/bindings/swig/ruby/test/util.rb Mon Aug 8 10:32:54 2011
> @@ -262,7 +262,7 @@ realm = #{@realm}
> "svn://#{@svnserve_host}:#{@svnserve_port}#{@full_repos_path}"
> # Avoid a race by waiting a short time for svnserve to start up.
> # Without this, tests can fail with "Connection refused" errors.
> - sleep 0.1
> + sleep 1
> break
> end
> end
Received on 2011-08-08 12:48:56 CEST

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.