<!-- Add the related story/sub-task/bug number, like Resolves#123, or
remove if NA -->
**Related issue:** Resolves#41154🤖 fix to flaky test I encountered. Tagging @getvictor because he wrote
the original test.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Improved test synchronization logic in the job polling test to more
reliably detect and verify job completion.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->