Fix wait_for num_sec param

Update use wait_for in tests instead of time.sleep