Fix for failing tests

closes #1609
- added wait for output
- changed order of test tasks