### CI Link

https://gradle-enterprise.elastic.co/s/ou2sap2dhy3q2/tests/:server:internalClusterTest/org.elasticsearch.snapshots.SharedClusterSnapshotRestoreIT/testDataFileFailureDuringSnapshot

### Repro line

./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.snapshots.SharedClusterSnapshotRestoreIT.testDataFileFailureDuringSnapshot" -Dtests.seed=37B64CEE1DCEACEB -Dtests.locale=uk -Dtests.timezone=Africa/Lusaka -Druntime.java=17

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

```
java.lang.Exception: Test abandoned because suite timeout was reached. 
    at __randomizedtesting.SeedInfo.seed([37B64CEE1DCEACEB]:0)
```
test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java
* reading it in again using a provided {@link Writeable.Reader}.
     */
    public static <C extends NamedWriteable, T extends C> C copyNamedWriteable(
        T original,
        NamedWriteableRegistry namedWriteableRegistry,
        Class<C> categoryClass
    ) throws IOException {
        return copyNamedWriteable(original, namedWriteableRegistry, categoryClass, Version.CURRENT);
    }
    /**
     * Same as {@link #copyNamedWriteable(NamedWriteable, NamedWriteableRegistry, Class)} but also allows to provide
     * a {@link Version} argument which will be used to write and read back the object.
     * @return
     */
    @SuppressWarnings("unchecked")
    public static <C extends NamedWriteable, T extends C> C copyNamedWriteable(
        T original,
        NamedWriteableRegistry namedWriteableRegistry,
        Class<C> categoryClass,
        Version version
    ) throws IOException {
        return copyInstance(
            original,
            namedWriteableRegistry,
            StreamOutput::writeNamedWriteable,
            in -> in.readNamedWriteable(categoryClass),
            version
        );
    }
    protected static <T> T copyInstance(