core test: more tighten error detection in tests