tests: Make migration test more robust and silent.