Added loop in travis config to wait for running state