Modified the task cancelled test

#2178