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

[Subclipse-dev] RE: [svnant] Test failures on trunk

From: Martin Letenay <mle_at_whitestein.com>
Date: 2006-07-24 16:04:18 CEST

> I'm seeing a few SvnAnt test failures on trunk using the command-line
> adapter. Not much time to deal with these ATM, but I hope someone
> else can get to'em. Here are the details (reproducible via 'ant
> runTests'):
>
> 1) In r1770, an API for getting properties from a URL was add to
> svnClientAdapter. This API is now used by the <propget> command. The
> API's implementation is currently incomplete for the command-line
> adapter -- it passes null for the File argument to CmdLineProperty's
> constructor, which causes a NPE within that constructor:
>
> Testcase: testProp took 2.687 sec
> Caused an ERROR
> null
> java.lang.NullPointerException
> at
> org.tigris.subversion.svnclientadapter.commandline.CmdLineProperty.<ini
> t>(CmdLineProperty.java:35)
> at
> org.tigris.subversion.svnclientadapter.commandline.CmdLineClientAdapter
> .propertyGet(CmdLineClientAdapter.java:737)
> at org.tigris.subversion.svnant.Propget.execute(Propget.java:100)
> ...
>
> Solution: CmdLineProperty needs to be refactored to handle SVNUrls as
> well as Files, and CmdLineClientAdapter's usage of CmdLineProperty
> needs to be updated accordingly.

Was already fixed in r r2516.

> 2) While a test directory is getting created properly, the wrong
> number of files is found in it:
>
> Testcase: testConflictedSelector took 21.181 sec
> FAILED
> expected:<2> but was:<0>
> junit.framework.AssertionFailedError: expected:<2> but was:<0>
> at
> org.tigris.subversion.svnant.SvnTest.testConflictedSelector(SvnTest.jav
> a:603)
>
> Solution: I'm guessing that the test setup is not occurring quite as
> expected, and that something needs to occur to either add the expected
> files, or (more likely) mark them as conflicted.

It turned out that the command line adapter was not setting
#getConflictedOld() etc. status fields at all.
The <conflictedSelector> was relying on that.
Adapter was fixed and unite test added in r2538.

> 3) The <info /> command is getting invoked with insufficient
> arguments, which should be triggering an Ant BuildException (from
> Info.validateAttributes()).
>
> Testcase: testSvnInfo took 0.746 sec
> FAILED
> Should throw BuildException because: Dir or file must be set.
> junit.framework.AssertionFailedError: Should throw BuildException
> because: Dir or file must be set.
> at
> org.tigris.subversion.svnant.SvnTest.testSvnInfo(SvnTest.java:871)
>
> Solution: Either we're not triggering the BuildException like we
> should be, or we're not correctly detecting it. Figure out which is
> the problem and fix it.

This one was probably my mistake, somehow during recent refactorings the
call to validateAttributes() was lost.
It was fixed in r2536 (during addition of "failonerror").

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: dev-help@subclipse.tigris.org
Received on Mon Jul 24 16:04:32 2006

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