Improve test state consistency