Replaces sleep in AJ integration test with a method which queries the adapter about jobs