Improve timing problem in spinach test