[FLINK-1253] Make sure tests do not die with garbage collection overhead exceeded