Stop streaming pipeline when global watermark reaches ****INF as suggested in BEAM-849 comments.
We can do this similarly to the solution in TestSparkRunner#awaitWatermarksOrTimeout by polling ```
SparkTimerInternals.global(GlobalWatermarkHolder.get(...))
We can also remove this code from `TestSparkRunner` if we make sure all sources in test behave in a way which shifts the watermark to ****INF at the end of the test.
Imported from Jira [BEAM-2847](https://issues.apache.org/jira/browse/BEAM-2847). Original Jira may contain additional context.
Reported by: aviemzur.