Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
simonh5 committed Oct 23, 2023
1 parent 619caf4 commit d6d128e
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 d6d128e

Please sign in to comment.