Fix timeout value for memory leak check job (#111386)
Fixes https://github.com/pytorch/pytorch/pull/110193 as it doesn't work as expected:
* I forgot the timeout on the test step
* Also MacOS test job wasn't covered
### Testing
The job timeout is set correctly to 600 https://github.com/pytorch/pytorch/actions/runs/6541825177/job/17764485473#step:14:7
Pull Request resolved: https://github.com/pytorch/pytorch/pull/111386
Approved by: https://github.com/clee2000