Custom timeout + fixes tests

Hello, 

we added custom timeout. If timeout is exceeded, then kill process.