Closed
Description
Build Scans:
- elasticsearch-intake #16057 / part1
- elasticsearch-pull-request #51498 / part-1-fips
- elasticsearch-periodic-platform-support #5927 / sles-15_platform-support-unix
- elasticsearch-periodic-platform-support #5927 / rocky-9_platform-support-unix
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.