Looks like the watcher thread was interrupted but the interrupt was lost somewhere along the way.

**Build scan:**
https://gradle-enterprise.elastic.co/s/tkibjrfrug5pw/tests/:server:test/org.elasticsearch.reservedstate.service.FileSettingsServiceTests/testStopWorksIfProcessingDidntReturnYet

**Reproduction line:**
```
./gradlew ':server:test' --tests "org.elasticsearch.reservedstate.service.FileSettingsServiceTests.testStopWorksIfProcessingDidntReturnYet" -Dtests.seed=2A90D2A7A2E74E69 -Dtests.locale=sl-SI -Dtests.timezone=America/Fortaleza -Druntime.java=17
```

**Applicable branches:**
8.7

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.reservedstate.service.FileSettingsServiceTests&tests.test=testStopWorksIfProcessingDidntReturnYet

**Failure excerpt:**
```
java.lang.Exception: Test abandoned because suite timeout was reached.

  at __randomizedtesting.SeedInfo.seed([2A90D2A7A2E74E69]:0)

```
server/src/test/java/org/elasticsearch/reservedstate/service/FileSettingsServiceTests.java
}
    public void testRegisterWatchKeyRetry() throws IOException, InterruptedException {
        var service = spy(fileSettingsService);
        doAnswer(i -> 0L).when(service).retryDelayMillis(anyInt());
        Files.createDirectories(service.watchedFileDir());
        var mockedPath = spy(service.watchedFileDir());
        var prevWatchKey = mock(WatchKey.class);
        var newWatchKey = mock(WatchKey.class);
        doThrow(new IOException("can't register")).doThrow(new IOException("can't register - attempt 2"))
            .doAnswer(i -> newWatchKey)
            .when(mockedPath)
            .register(
                any(),
                eq(StandardWatchEventKinds.ENTRY_MODIFY),
                eq(StandardWatchEventKinds.ENTRY_CREATE),
                eq(StandardWatchEventKinds.ENTRY_DELETE)
            );
        var result = service.enableDirectoryWatcher(prevWatchKey, mockedPath);
        assertThat(result, sameInstance(newWatchKey));
        assertTrue(result != prevWatchKey);
        verify(service, times(2)).retryDelayMillis(anyInt());
    }
    
    private void writeTestFile(Path path, String contents) throws IOException {
        Path tempFilePath = createTempFile();
        Files.write(tempFilePath, contents.getBytes(StandardCharsets.UTF_8));
        Files.move(tempFilePath, path, StandardCopyOption.ATOMIC_MOVE);
    }
}