fix timing problem in Alert test