Fix test infrastructure