1. Fix build break in fedora

2. Add wait conditions to test cases.