@defer.deferredGenerator
    def recoverInstance(self, occurance):
        #check to make sure this is one of our instances
        if occurance.instance.app.name == self.name:
            self.log('application crashed restarting')
            #by default go through the AppManager
            d = self.service.startInstance(occurance.instance.label)
            d.addCallback(lambda x: self.log('sucessfully restarted') and x)
            d.addErrback(lambda x: self.log('failed to recover from crash') and x)
            result = None
            try:
                wfd = defer.waitForDeferred(d)
                yield wfd
                yield wfd.getResult()
            except:
                failure = Failure()
                self.log('throttling restart attempts')
                d = defer.Deferred()
                self.reactor.callLater(10, d.callback, None)
                wfd = defer.waitForDeffered(d)
                yield wfd
                wfd.getResult()
                yield failure
        else:
            yield 'not my application instance'
Add a test case to this class.
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/lib/droned/applications/__init__.py/ApplicationPlugin.recoverInstance--crossover with--dataset/ETHPy150Open numba/numba/numba/testing/ddt.py/add_test