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

Re: Should this test pass?

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-01-11 08:51:00 CET

Hi Daniel,

On 1/10/07, Daniel Rall <dlr@collab.net> wrote:
> On Wed, 10 Jan 2007, Joe Swatosh wrote:
>
> > ... Its interesting that the original
> > Ruby bindings tests pass on kou's platform.
>
> If he was running them only under FSFS, it wouldn't have had this problem,
> yes?
>
True. The first way I got the Ruby binding tests in question to
"pass" was to change the file system. But what is going on?

Is this a bad test?
Should the test be changed to use FSFS and forget about it?
Should the bindings be modified so that this test can pass?

It seems to me to be a real corner case. How often (besides in a
test) are we going to create and destroy a file system or a repository
in the same script? If its done in different scripts it obviously
won't matter because the original pool will have been destroyed. On
the other hand, it somehow seems awkward that the this sequence
doesn't work

  def test_create
    path = File.join(@tmp_path, "fs")
    fs_type = Svn::Fs::TYPE_BDB
    config = {Svn::Fs::CONFIG_FS_TYPE => fs_type}

    assert(!File.exist?(path))
    fs = Svn::Fs::FileSystem.create(path, config)
    assert(File.exist?(path))
    assert_equal(fs_type, Svn::Fs.type(path))
    fs.set_warning_func do |err|
      p err
      abort
    end
    assert_equal(path, fs.path)
    Svn::Fs::FileSystem.delete(path)
    assert(!File.exist?(path))
  end

Dunno. Its an interesting question.

--
Joe Swatosh
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 11 08:51:14 2007

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.