The LocalJUnitRunner class is used to automate XTS unit testing. It sends a request to an HTTP servlet in a spawned AS and then polls the servlet waiting for the test results to come back. The poll loop waits for a result containing the keyword "finished". This means it will run forever if one of the unit tests hangs. The poll loop should have some way of timing out, e.g. by limiting the number of times it will loop.