My understanding is that more experienced members here on the forum will very likely advise you not to go on an extended holiday as this might conflict with your "intent to stay in Canada".
Personally, without having an experience, I would say this all depends on your circumstances. Firstly, if you get the invitation for a test interview, you can contact them to let them know that you are abroad and that you need to re-schedule the test. Make sure you have somebody to check your mail and that you check your ecas status. You do not want to miss your test without having contacted them with an explanation of why.
Be also prepared that you might get some questions in your interview regarding your extended holiday.
Personally, I will have to leave for 5 weeks to take care of my 85-year-old mother in Germany who lives on her own. Should I get an invitation for the test during this time, I will contact them and explain my circumstances, attaching the relevant proof; e.g. copy of my mother's passport r which proves her age and copy of the flight tickets. At that point in time, I will also let them know that I will have to go back to Germany in September for another 3 weeks.
I see it as my duty as a good citizen to take responsibility for my family and cannot see that this will work against me. I have to say though that my intent to stay should be believable as I am married to a Canadian (born in Canada), have three Canadian kids and have been in the country for over 8 years.
If it works against me, then frankly...my mother is more important and if it takes longer, well it takes longer.
Again, this is my personal opinion and I have no clue how CIC deals with this.
In an ideal world, you probably stay put and wait for the whole thing to be finished before you do anything.
Stef.