What should I do in this case?
Any interview process involves a large amount of trust from both sides on all sorts of aspects, one of the most important of which is that the other party is serious and committed to seeing the process through.
The truth is that in the vast majority of recruitment processes, both sides are evaluating many options simultaneously. When one option results in an acceptable offer, they cancel all the other processes in the interests of saving everyone's time.
When you go into interview processes, you have to know this and plan around it. It does happen. The odds of it happening depend on the company's recruiting strategy, and here you've come across a particularly extreme case where they did cast a wide net, weren't particularly committed to seeing the process through with you, and didn't mind wasting your time. The 5 min cancellation is particularly annoying and unfair, yes, though at least they were honest about it!
So, what's the lesson?
You will always fundamentally need to trust the company when interviewing, but in future you should take steps to build and validate this trust before you make commitments like taking holidays to accommodate the interview process.
A few things you can do
- Ask plainly in initial communication what the process will be, what specifically will happen and when. Don't begin the process until this has been explained.
- If it's not already part of the official process, ask for a quick introductory call with the Hiring Manager before beginning it. 15 minutes is enough. Introduce yourselves and talk about the role. You can usually get a decent signal on if the other party is serious based on this.
- Be more casual and flexible about early stages in the process. Especially if it's a call, ask if it can be done before or after your usual working hours so you don't have to take holiday.
- Confirm 24 hours in advance, and then a couple of hours in advance, of the interview, that it's still going ahead. These two time periods give them two easy 'get out' opportunities and if they do need to cancel really late on, at least you can somewhat salvage your schedule with a bit more notice.
All of the above will be looked on positively by anyone serious. If you get cold or negative reactions to any of them, it's a red flag and you should be the one withdrawing from the process at that point.