Added a timeout to stop func since Travis seems to be slower than my machine

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>