schizophrenicmaniac opened a new pull request, #40740:
URL: https://github.com/apache/beam/pull/40740

   Fixes #40734
   
   The Solace IO Direct precommit fails often because of how the integration 
tests are set up. This PR changes three things.
   
   The container used fixed host ports from `findAvailablePort()`. That opens a 
socket on port 0, closes it, and only binds the port when the container starts, 
so something else can take the port in between. The ports are now normally 
exposed, and the mapped ports are read with `getMappedPort` after the container 
starts.
   
   The read tests waited a fixed 15 seconds and then checked the counter. On a 
slow runner that can be too short, and since the read never finishes, the 
pipeline was left running in the test JVM afterwards. A small helper now polls 
the read counter until it reaches the expected count, with a 2 minute limit, 
and then cancels the pipeline. This applies to `SolaceIOIT`, 
`SolaceIOMultipleSempIT` and `SolaceIOCustomSessionServiceFactoryIT`.
   
   Creating the queue and its subscription through SEMP only logged errors, and 
curl exits 0 on HTTP errors anyway. If SEMP wasn't ready yet, the setup kept 
going and the read test later failed with a wrong count. Those two calls now 
use `curl --fail`, retry for up to 30 seconds, and fail the setup with a clear 
error if they still don't succeed.
   
   These are test-only changes. I couldn't run the ITs locally since I don't 
have Docker on this machine, so I'm relying on this PR's precommit run, ideally 
re-run a few times. Unit tests, checkstyle and spotbugs pass for the module.


-- 
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]

Reply via email to