Skip to content

Commit

Permalink
Merge pull request aim42#311 from hofi1/fix-flaky-test
Browse files Browse the repository at this point in the history
fix flaky test org.aim42.htmlsanitycheck.check.BrokenCrossReferencesCheckerTest.testTwoBrokenLinks
  • Loading branch information
gernotstarke authored Oct 24, 2023
2 parents 619caf4 + d6d128e commit fa8b073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class BrokenCrossReferencesChecker extends SuggestingChecker {
protected SingleCheckResults check(final HtmlPage pageToCheck) {
//get list of all a-tags "<a href=..." in html file
hrefList = pageToCheck.getAllHrefStrings()
hrefSet = hrefList.toSet()
hrefSet = hrefList.toSet().sort()

// get list of all id="XYZ"
listOfIds = pageToCheck.getAllIdStrings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,13 @@ class BrokenCrossReferencesCheckerTest extends GroovyTestCase {

// first finding: aim42 link missing
String actual = collector.findings.first()
String expected = "link target \"arc42\" missing"
String expected = "link target \"aim42\" missing"
String message = "expected $expected"

assertEquals(message, expected, actual)

// second finding: arc42 link missing
actual = collector.findings[1]
expected = "link target \"aim42\" missing"
expected = "link target \"arc42\" missing"
assertEquals(message, expected, actual)
}

Expand Down

0 comments on commit fa8b073

Please sign in to comment.