[
https://issues.apache.org/jira/browse/DOXIATOOLS-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17000462#comment-17000462
]
Elliotte Rusty Harold edited comment on DOXIATOOLS-64 at 12/19/19 10:42 PM:
----------------------------------------------------------------------------
The test is indeed flaky. This is the code:
{code:java}
{{ public void testFigure()
{ String source = "figure.jpg"; String caption = "Figure_caption";
this.sink.figure(); this.sink.figureGraphics(source);
this.sink.figureCaption(); this.sink.text(caption); this.sink.figureCaption_();
this.sink.figure_(); this.sink.flush(); this.sink.close(); String actual =
this.testWriter.toString(); String expected = this.getFigureBlock(source,
caption); assertEquals("Wrong figure!", expected, actual); }
}}
{code}
and this is the incorrect failure:
Expected :<mediaobject><imageobject><imagedata fileref="figure.jpg"
format="JPG"
/></imageobject><caption><para>Figure_caption</para></caption></mediaobject>
Actual :<mediaobject><imageobject><imagedata format="JPG" fileref="figure.jpg"
/></imageobject><caption><para>Figure_caption</para></caption></mediaobject>
was (Author: elharo):
The test is indeed flaky. This is the code:
{code:java}
{{ public void testFigure()
{ String source = "figure.jpg"; String caption = "Figure_caption";
this.sink.figure(); this.sink.figureGraphics(source);
this.sink.figureCaption(); this.sink.text(caption); this.sink.figureCaption_();
this.sink.figure_(); this.sink.flush(); this.sink.close(); String actual =
this.testWriter.toString(); String expected = this.getFigureBlock(source,
caption); assertEquals("Wrong figure!", expected, actual); }
}}
{code}
and this is the incorrect failure:
Expected :<mediaobject><imageobject><imagedata fileref="figure.jpg"
format="JPG"
/></imageobject><caption><para>Figure_caption</para></caption></mediaobject>
Actual :<mediaobject><imageobject><imagedata format="JPG" fileref="figure.jpg"
/></imageobject><caption><para>Figure_caption</para></caption></mediaobject>
> Flaky test DocBookBookSinkTest
> ------------------------------
>
> Key: DOXIATOOLS-64
> URL: https://issues.apache.org/jira/browse/DOXIATOOLS-64
> Project: Maven Doxia Tools
> Issue Type: Bug
> Reporter: Elliotte Rusty Harold
> Priority: Minor
>
> Looks like the test assumes too much about attribute order
> FAILURE! - in
> org.apache.maven.doxia.book.services.renderer.docbook.DocBookBookSinkTest
> testFigure(org.apache.maven.doxia.book.services.renderer.docbook.DocBookBookSinkTest)
> Time elapsed: 0.008 sec <<< FAILURE!
> junit.framework.ComparisonFailure: Wrong figure!
> expected:<...ileref="figure.jpg" format="JPG...> but was:<...ormat="JPG"
> fileref="figure.jpg...>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at
> org.apache.maven.doxia.sink.AbstractSinkTest.testFigure(AbstractSinkTest.java:424)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)