From 41c4ee7997fc1001687abfef18d5200e4d625d7e Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sat, 26 Oct 2019 11:47:32 +0400 Subject: [PATCH] fix htmlunit js errors --- src/main/java/ru/ulstu/grant/service/KiasService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/ru/ulstu/grant/service/KiasService.java b/src/main/java/ru/ulstu/grant/service/KiasService.java index b5ddd36..ce005b5 100644 --- a/src/main/java/ru/ulstu/grant/service/KiasService.java +++ b/src/main/java/ru/ulstu/grant/service/KiasService.java @@ -35,6 +35,8 @@ public class KiasService { Integer leaderId = userService.findOneByLoginIgnoreCase("admin").getId(); List grants = new ArrayList<>(); try (final WebClient webClient = new WebClient()) { + webClient.setJavaScriptTimeout(60 * 1000); + webClient.getOptions().setThrowExceptionOnScriptError(false); for (Integer year : generateGrantYears()) { final HtmlPage page = webClient.getPage(String.format(BASE_URL, CONTEST_STATUS_ID, CONTEST_TYPE, year)); grants.addAll(getKiasGrants(page));