Fix test timeout behavior