Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12039 closed defect (fixed)

Intermittent test failures

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Milestone: 1.0.6
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fix functional test failure when random_word() conflicts with links in header.

API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

I've seen this a few times in Travis CI. It seems to be rather rare. Most recently it occurred on the trunk. I'm unsure as to whether the issue can occur on branches.

======================================================================
FAIL: runTest (trac.versioncontrol.tests.functional.TestRepoBrowse)
Add a file to the repository and verify it is in the browser
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/edgewall/trac/trac/versioncontrol/tests/functional.py", line 119, in runTest
    tc.follow(tempfilename)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/twill/commands.py", line 199, in follow
    browser.follow_link(link)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/twill/browser.py", line 207, in follow_link
    self._journey('follow_link', link)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/twill/browser.py", line 549, in _journey
    callable(func_name, *args, **kwargs)
  File "/home/travis/build/edgewall/trac/trac/tests/functional/better_twill.py", line 128, in _validate_xhtml
    _format_error_log(page, e.error_log))
TwillAssertionError: 
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 230, column 23
</p>
<p>
See also: <a class="wiki" href="/wiki/TracPlugins">TracPlugins</a>
</p>
<table class="wiki"><tbody></tbody></table><h3 id="header_logo-section"><code>[header_logo]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>alt</code></td><td>Alternative text for the header logo.</td><td class="default"><code>(please configure the [header_logo] section in trac.ini)</code></td></tr><tr class="odd"><td><code>height</code></td><td>Height of the header logo image in pixels.</td><td class="default"><code>-1</code></td></tr><tr class="even"><td><code>link</code></td><td>URL to link to, from the header logo.</td><td class="nodefault">(no default)</td></tr><tr class="odd"><td><code>src</code></td><td>URL of the image to use as header logo.
It can be absolute, server relative or relative.
If relative, it is relative to one of the <code>/chrome</code> locations:
<code>site/your-logo.png</code> if <code>your-logo.png</code> is located in the <code>htdocs</code>
folder within your <a class="wiki" href="/wiki/TracEnvironment">TracEnvironment</a>;
<code>common/your-logo.png</code> if <code>your-logo.png</code> is located in the
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 278, column 25
# -- Link to an external Trac:
trac.title = Edgewall's Trac for Trac
trac.url = http://trac.edgewall.org
</pre><table class="wiki"><tbody></tbody></table><h3 id="interwiki-section"><code>[interwiki]</code></h3><p>
Every option in the <code>[interwiki]</code> section defines one <a class="wiki" href="/wiki/InterWiki">InterWiki</a>
prefix. The option name defines the prefix. The option value defines
the URL, optionally followed by a description separated from the URL
by whitespace. Parametric URLs are supported as well.
</p>
<p>
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 291, column 25
<pre class="wiki">[interwiki]
MeatBall = http://www.usemod.com/cgi-bin/mb.pl?
PEP = http://www.python.org/peps/pep-$1.html Python Enhancement Proposal $1
tsvn = tsvn: Interact with TortoiseSvn
</pre><table class="wiki"><tbody></tbody></table><h3 id="logging-section"><code>[logging]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>log_file</code></td><td>If <code>log_type</code> is <code>file</code>, this should be a path to the
log-file.  Relative paths are resolved relative to the <code>log</code>
directory of the environment.</td><td class="default"><code>trac.log</code></td></tr><tr class="odd"><td><code>log_format</code></td><td>Custom logging format.
If nothing is set, the following will be used:
<code>Trac[$(module)s] $(levelname)s: $(message)s</code>
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 378, column 23
CSS rule: <code>table.progress td.&lt;class&gt; { background: &lt;color&gt; }</code>
to a <a class="wiki" href="/wiki/TracInterfaceCustomization#SiteAppearance">site/style.css</a> file
for example.
</p>
<table class="wiki"><tbody></tbody></table><h3 id="mimeviewer-section"><code>[mimeviewer]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>max_preview_size</code></td><td>Maximum file size for HTML preview.</td><td class="default"><code>262144</code></td></tr><tr class="odd"><td><code>mime_map</code></td><td>List of additional MIME types and keyword mappings.
Mappings are comma-separated, and for each MIME type,
there's a colon (":") separated list of associated keywords
or file extensions.</td><td class="default"><code>text/x-dylan:dylan, text/x-idl:ice, text/x-ada:ads:adb</code></td></tr><tr class="even"><td><code>mime_map_patterns</code></td><td>List of additional MIME types associated to filename patterns.
Mappings are comma-separated, and each mapping consists of a MIME type
and a Python regexp used for matching filenames, separated by a colon
(":"). (<em>since 1.0</em>)</td><td class="default"><code>text/plain:README|INSTALL|COPYING.*</code></td></tr><tr class="odd"><td><code>pygments_default_style</code></td><td>The default style to use for Pygments syntax highlighting.</td><td class="default"><code>trac</code></td></tr><tr class="even"><td><code>pygments_modes</code></td><td>List of additional MIME types known by Pygments.
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 459, column 23
<p>
Available subscribers:
</p><div class="trac-subscriberlist"><table class="wiki"><thead><tr><th>Subscriber</th><th>Description</th></tr></thead><tbody><tr class="even"><td><code>AlwaysEmailSubscriber</code></td><td></td></tr><tr class="odd"><td><code>CarbonCopySubscriber</code></td><td>Ticket that I'm listed in the CC field is modified</td></tr><tr class="even"><td><code>TicketOwnerSubscriber</code></td><td>Ticket that I own is created or modified</td></tr><tr class="odd"><td><code>TicketPreviousUpdatersSubscriber</code></td><td>Ticket that I previously updated is modified</td></tr><tr class="even"><td><code>TicketReporterSubscriber</code></td><td>Ticket that I reported is modified</td></tr><tr class="odd"><td><code>TicketUpdaterSubscriber</code></td><td>I update a ticket</td></tr></tbody></table></div><p>
</p>
<table class="wiki"><tbody></tbody></table><h3 id="project-section"><code>[project]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>admin</code></td><td>E-Mail address of the project's administrator.</td><td class="nodefault">(no default)</td></tr><tr class="odd"><td><code>admin_trac_url</code></td><td>Base URL of a Trac instance where errors in this Trac
should be reported.
This can be an absolute or relative URL, or '.' to reference
this Trac instance. An empty value will disable the reporting
buttons.</td><td class="default"><code>.</code></td></tr><tr class="even"><td><code>descr</code></td><td>Short description of the project.</td><td class="default"><code>My example project</code></td></tr><tr class="odd"><td><code>footer</code></td><td>Page footer text (right-aligned).</td><td class="default"><code>Visit the Trac open source project at&lt;br /&gt;&lt;a href="http://trac.edgewall.org/"&gt;http://trac.edgewall.org/&lt;/a&gt;</code></td></tr><tr class="even"><td><code>icon</code></td><td>URL of the icon of the project.</td><td class="default"><code>common/trac.ico</code></td></tr><tr class="odd"><td><code>name</code></td><td>Name of the project.</td><td class="default"><code>My Project</code></td></tr><tr class="even"><td><code>url</code></td><td>URL of the main project web site, usually the website in
which the <code>base_url</code> resides. This is used in notification
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 495, column 23
</p>
<p>
(<em>since 0.12</em>)
</p>
<table class="wiki"><tbody></tbody></table><h3 id="revisionlog-section"><code>[revisionlog]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>default_log_limit</code></td><td>Default value for the limit argument in the <a class="wiki" href="/wiki/TracRevisionLog">TracRevisionLog</a>.</td><td class="default"><code>100</code></td></tr><tr class="odd"><td><code>graph_colors</code></td><td>Comma-separated list of colors to use for the <a class="wiki" href="/wiki/TracRevisionLog">TracRevisionLog</a>
graph display. (<em>since 1.0</em>)</td><td class="default"><code>#cc0,#0c0,#0cc,#00c,#c0c,#c00</code></td></tr></tbody></table><h3 id="roadmap-section"><code>[roadmap]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>stats_provider</code></td><td>Name of the component implementing <code>ITicketGroupStatsProvider</code>,
which is used to collect statistics on groups of tickets for display
in the roadmap views.</td><td class="default"><code>DefaultTicketGroupStatsProvider</code></td></tr></tbody></table><h3 id="search-section"><code>[search]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>default_disabled_filters</code></td><td>Specifies which search filters should be disabled by
default on the search page. This will also restrict the
filters for the quick search function. The filter names
defined by default components are: <code>wiki</code>, <code>ticket</code>,
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 566, column 23
Finally, the relative URLs introduced in
<a class="ext-link" href="http://subversion.apache.org/docs/release-notes/1.5.html#externals"><span class="icon">&#8203;</span>Subversion 1.5</a>
are not yet supported.
</p>
<table class="wiki"><tbody></tbody></table><h3 id="ticket-section"><code>[ticket]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>default_cc</code></td><td>Default cc: list for newly created tickets.</td><td class="nodefault">(no default)</td></tr><tr class="odd"><td><code>default_component</code></td><td>Default component for newly created tickets.</td><td class="nodefault">(no default)</td></tr><tr class="even"><td><code>default_description</code></td><td>Default description for newly created tickets.</td><td class="nodefault">(no default)</td></tr><tr class="odd"><td><code>default_keywords</code></td><td>Default keywords for newly created tickets.</td><td class="nodefault">(no default)</td></tr><tr class="even"><td><code>default_milestone</code></td><td>Default milestone for newly created tickets.</td><td class="nodefault">(no default)</td></tr><tr class="odd"><td><code>default_owner</code></td><td>Default owner for newly created tickets.</td><td class="default"><code>&lt; default &gt;</code></td></tr><tr class="even"><td><code>default_priority</code></td><td>Default priority for newly created tickets.</td><td class="default"><code>major</code></td></tr><tr class="odd"><td><code>default_resolution</code></td><td>Default resolution for resolving (closing) tickets.</td><td class="default"><code>fixed</code></td></tr><tr class="even"><td><code>default_severity</code></td><td>Default severity for newly created tickets.</td><td class="nodefault">(no default)</td></tr><tr class="odd"><td><code>default_summary</code></td><td>Default summary (title) for newly created tickets.</td><td class="nodefault">(no default)</td></tr><tr class="even"><td><code>default_type</code></td><td>Default type for newly created tickets.</td><td class="default"><code>defect</code></td></tr><tr class="odd"><td><code>default_version</code></td><td>Default version for newly created tickets.</td><td class="nodefault">(no default)</td></tr><tr class="even"><td><code>max_comment_size</code></td><td>Maximum allowed comment size in characters.</td><td class="default"><code>262144</code></td></tr><tr class="odd"><td><code>max_description_size</code></td><td>Maximum allowed description size in characters.</td><td class="default"><code>262144</code></td></tr><tr class="even"><td><code>max_summary_size</code></td><td>Maximum allowed summary size in characters. (<em>since 1.0.2</em>)</td><td class="default"><code>262144</code></td></tr><tr class="odd"><td><code>optional_fields</code></td><td>Comma-separated list of <code>select</code> fields that can have
an empty value. (<em>since 1.1.2</em>)</td><td class="default"><code>milestone, version</code></td></tr><tr class="even"><td><code>preserve_newlines</code></td><td>Whether Wiki formatter should respect the new lines present
in the Wiki text.
If set to 'default', this is equivalent to 'yes' for new environments
but keeps the old behavior for upgraded environments (i.e. 'no').</td><td class="default"><code>default</code></td></tr><tr class="odd"><td><code>restrict_owner</code></td><td>Make the owner field of tickets use a drop-down menu.
Be sure to understand the performance implications before activating
this option. See
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 581, column 23
e-mail addresses must remain protected.</td><td class="default"><code>false</code></td></tr><tr class="even"><td><code>workflow</code></td><td>Ordered list of workflow controllers to use for ticket actions.</td><td class="default"><code>ConfigurableTicketWorkflow</code></td></tr></tbody></table><h3 id="ticket-custom-section"><code>[ticket-custom]</code></h3><p>
In this section, you can define additional fields for tickets. See
<a class="wiki" href="/wiki/TracTicketsCustomFields">TracTicketsCustomFields</a> for more details.
</p>
<table class="wiki"><tbody></tbody></table><h3 id="ticket-workflow-section"><code>[ticket-workflow]</code></h3><p>
The workflow for tickets is controlled by plugins. By default,
there's only a <code>ConfigurableTicketWorkflow</code> component in charge.
That component allows the workflow to be configured via this section
in the <code>trac.ini</code> file. See <a class="wiki" href="/wiki/TracWorkflow">TracWorkflow</a> for more details.
</p>
<table class="wiki"><tbody></tbody></table><h3 id="timeline-section"><code>[timeline]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>abbreviated_messages</code></td><td>Whether wiki-formatted event messages should be truncated or not.
# Element tbody content does not follow the DTD, expecting (tr)+, got 
# URL: http://127.0.0.1:8535/wiki/TracIni#header_logo-section
# Line 587, column 23
there's only a <code>ConfigurableTicketWorkflow</code> component in charge.
That component allows the workflow to be configured via this section
in the <code>trac.ini</code> file. See <a class="wiki" href="/wiki/TracWorkflow">TracWorkflow</a> for more details.
</p>
<table class="wiki"><tbody></tbody></table><h3 id="timeline-section"><code>[timeline]</code></h3><table class="wiki"><tbody><tr class="even"><td><code>abbreviated_messages</code></td><td>Whether wiki-formatted event messages should be truncated or not.
This only affects the default rendering, and can be overriden by
specific event providers, see their own documentation.</td><td class="default"><code>enabled</code></td></tr><tr class="odd"><td><code>changeset_collapse_events</code></td><td>Whether consecutive changesets from the same author having
exactly the same message should be presented as one event.
That event will link to the range of changesets in the log view.</td><td class="default"><code>false</code></td></tr><tr class="even"><td><code>changeset_long_messages</code></td><td>Whether wiki-formatted changeset messages should be multiline or
not.

Attachments (0)

Change History (4)

comment:1 by Jun Omae, 9 years ago

Milestone: next-dev-1.1.x1.0.6

Reproduced. When wiki, header, logo or section is generated for tempfilename variable, the following link in logo is wrongly visited in the TestRepoBrowse test.

        <a id="logo" href="/wiki/TracIni#header_logo-section"><img src="/chrome/site/your_project_logo.png" alt="(please configure the [header_logo] section in trac.ini)" /></a>

It would be fixed by multiple random words.

  • trac/versioncontrol/tests/functional.py

    diff --git a/trac/versioncontrol/tests/functional.py b/trac/versioncontrol/tests/functional.py
    index 438e0fb..52eb0d5 100755
    a b class TestRepoBrowse(FunctionalTwillTestCaseSetup):  
    105105    def runTest(self):
    106106        """Add a file to the repository and verify it is in the browser"""
    107107        # Add a file to Subversion
    108         tempfilename = random_word()
     108        tempfilename = '-'.join(random_word() for x in xrange(3))
    109109        fulltempfilename = 'component1/trunk/' + tempfilename
    110110        revision = self._testenv.svn_add(fulltempfilename, random_page())
    111111

comment:2 by Jun Omae, 9 years ago

Owner: set to Jun Omae
Status: newassigned

comment:3 by Jun Omae, 9 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fixed in [14024] and merged to trunk in [14025].

comment:4 by Ryan J Ollos, 9 years ago

Description: modified (diff)
Summary: Intermittent test failures in Travis CIIntermittent test failures

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.