Fix invitation integration test timing issue