Skip to content

[CI] FileSettingsServiceTests testInvalidJSON failing #120482

Closed
@elasticsearchmachine

Description

@elasticsearchmachine

Build Scans:

Reproduction Line:

./gradlew ":server:test" --tests "org.elasticsearch.reservedstate.service.FileSettingsServiceTests.testInvalidJSON" -Dtests.seed=1305FC3681068953 -Dtests.locale=ar-IL -Dtests.timezone=Etc/GMT-1 -Druntime.java=23

Applicable branches:
main

Reproduces locally?:
No

Failure History:
See dashboard

Failure Message:

org.mockito.exceptions.misusing.UnfinishedStubbingException: 
Unfinished stubbing detected here:
-> at org.elasticsearch.reservedstate.service.FileSettingsServiceTests.testInvalidJSON(FileSettingsServiceTests.java:312)

E.g. thenReturn() may be missing.
Examples of correct stubbing:
    when(mock.isOk()).thenReturn(true);
    when(mock.isOk()).thenThrow(exception);
    doThrow(exception).when(mock).someVoidMethod();
Hints:
 1. missing thenReturn()
 2. you are trying to stub a final method, which is not supported
 3. you are stubbing the behaviour of another mock inside before 'thenReturn' instruction is completed

Issue Reasons:

  • [main] 4 failures in test testInvalidJSON (23.5% fail rate in 17 executions)

Note:
This issue was created using new test triage automation. Please report issues or feedback to es-delivery.

Metadata

Metadata

Assignees

Labels

:Core/Infra/SettingsSettings infrastructure and APIs>test-failureTriaged test failures from CITeam:Core/InfraMeta label for core/infra teamlow-riskAn open issue or test failure that is a low risk to future releases

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions