Skip to content

Commit adf8b96

Browse files
committed
JsoupSiteParserTest: fix a sporadic test failure.
isFullyInitializedWhenAllMandatoryFieldsAreSet test could fail sometimes with the following error: JsoupSiteParserTest.isFullyInitializedWhenAllMandatoryFieldsAreSet:286 JsoupSiteParser[name=wTtSagJviB, matchedUrl=http://example.com/page/H1//h//6z, categoryLocator=null, countryLocator=null, shortDescriptionLocator=null, imageUrlLocator=null, imageUrlAttribute=src, issueDateLocator=null, sellerLocator=null, priceLocator=null, currencyValue=null] expected to be fully initialized Expected: is <true> but: was <false> Correction for 96b173b commit (#685).
1 parent eaa4325 commit adf8b96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/ru/mystamps/web/util/extractor/JsoupSiteParserTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ public void isFullyInitializedWhenAllMandatoryFieldsAreSet() {
262262
final int countOfFieldsWithLocator = 7;
263263
String[] locators = new String[countOfFieldsWithLocator];
264264

265+
int guaranteedSetPosition = between(0, locators.length - 1).integer();
265266
for (int i = 0; i < locators.length; i++) {
266-
int guaranteedSetPosition = between(0, locators.length - 1).integer();
267267
if (i == guaranteedSetPosition) {
268268
locators[i] = Random.jsoupLocator();
269269
} else {

0 commit comments

Comments
 (0)