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

svnadmin_tests.py 24 and svntest.verify.UnorderedRegexOutput

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 04 Oct 2011 20:00:49 +0100

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

  expected_output = svntest.verify.UnorderedRegexOutput([
      "Path: /A/B/lambda",
      "UUID Token: opaquelocktoken",
      "Owner: jrandom",
      "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
Received on 2011-10-04 21:01:28 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.