This behavior is called "Passive Aggression".
Passive-aggressiveness, as is obvious from the term itself, refers to an inclination where someone engages in a discourse where they do not use the direct expressions to show their hostility rather an indirect course is taken by means of insults and planned failures to do the required jobs etc.