bamaer commented on PR #9156:
URL: https://github.com/apache/hop/pull/9156#issuecomment-6516389600
@hansva thanks, the `HopEnvironment` reset and the WatchFiles
acknowledgement wait both look right.
**Should fix**
-
`S3CommonPipedOutputStreamTest.closeSurfacesAFailedUploadInsteadOfSwallowingIt`:
when the upload fails before `write()` runs, `write()` throws "Pipe closed"
and satisfies `assertThrows` on its own, so `close()` is never checked. With
that race forced, the test still passes when `close()` swallows the upload
failure. Suggest keeping the assertion on `close()` and tolerating the
`write()` failure:
```java
try {
out.write(new byte[] {1, 2, 3});
} catch (IOException e) {
// The upload may already have failed and closed the pipe: close() must
still report it
}
assertThrows(
IOException.class,
out::close,
"a failed S3 upload must be reported from close(), not silently
swallowed");
```
With the race forced, this passes, and it fails if `close()` swallows the
failure.
Built on top of current main; unit tests of core, engine, aws, watchfiles
and the plugins that use `RestoreHopEnvironmentExtension` pass, and
`WatchFilesIntegrationTest` passed 10/10 runs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]