API Tests: Fix position of sleep stmt

Fix the location of the sleep statement