RFR: 1393: PR bot fails on missing .jcheck/conf [v10]

Zhao Song zsong at openjdk.org
Wed Nov 16 17:32:07 UTC 2022


On Wed, 16 Nov 2022 14:49:46 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated CommitCommandTests#missingJcheckConf
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/LimitedCensusInstance.java line 77:
> 
>> 75:             conf = Optional.of(Arrays.stream(remoteRepo.fileContents(name, ref).split("\n")).toList());
>> 76:         } catch (NoSuchElementException ignored) {
>> 77:             // NoSuchElementException will only work for tests
> 
> I'm not sure I understand this part.

In real circumstance, if jcheck configuration file is missing, we will get `UncheckedRestException` with status code 404  from GitHub or GitLab. However, if the jcheck configuration file is missing in local environment, we won't get `UncheckedRestException` , instead, we will only get `NoSuchElementException`. If we don't catch this exception here, the test will not be able to continue.

-------------

PR: https://git.openjdk.org/skara/pull/1407


More information about the skara-dev mailing list