You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/19 22:42:00 UTC
[jira] [Commented] (DOXIATOOLS-64) Flaky test DocBookBookSinkTest
[ https://issues.apache.org/jira/browse/DOXIATOOLS-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17000462#comment-17000462 ]
Elliotte Rusty Harold commented on DOXIATOOLS-64:
-------------------------------------------------
The test is indeed flaky. This is the code:
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);
}
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)