Attempt to fix test fail in travis when sleep value is negative