Integration tests for scheduler

@peterbourgon  @jmyounker
Please put port numbers into variables.