You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@wandisco.com> on 2011/10/04 21:00:49 UTC

svnadmin_tests.py 24 and svntest.verify.UnorderedRegexOutput

We had a buildbot failure: http://ci.apache.org/builders/bb-openbsd/builds/170

The test locks two files, runs 'svnadmin lslocks' and checks the output
using:

  expected_output = svntest.verify.UnorderedRegexOutput([
      "Path: /A/B/lambda",
      "UUID Token: opaquelocktoken",
      "Owner: jrandom",
      "Created:",
      "Expires:",
      "Comment \(1 line\):",
      "Locking files",
      "Path: /iota",
      "UUID Token: opaquelocktoken.*",      
      "\n", # empty line    
      ])

The "Created:" lines in the svnadmin output include a timestamp and the
test passes when the two locks have the same timestamp, but
occassionally the timestamps differ by one second and the test fails.

This seems to be a problem with our regexp matching. The output has two
identical "Owner" lines and the one "Owner" line in UnorderedRegexOutput
will match both.  The output has two different "UUID" lines and we have
two "UUID" lines in UnorderedRegexOutput, and although either would
match both lines in the output we need to have both "UUID" lines in
UnorderedRegexOutput or the test fails.

A line in UnorderedRegexOutput will match multiple lines in the output
provided the output lines match, but where different output lines match
it will only match one of them.

So it seems we need one "Created:" line in UnorderedRegexOutput when the
two timestamps are the same, but two lines when the timestamps differ.

Are we misusing UnorderedRegexOutput?  How do we fix the test?

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: svnadmin_tests.py 24 and svntest.verify.UnorderedRegexOutput

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> So it seems we need one "Created:" line in UnorderedRegexOutput when the
> two timestamps are the same, but two lines when the timestamps differ.
>
> Are we misusing UnorderedRegexOutput?  How do we fix the test?

r1179117 tries two regex if one fails.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com