Skip to content

Commit

Permalink
Change RunMixin.killSlave to optionally take the slave and builder na…
Browse files Browse the repository at this point in the history
…mes as arguments.
  • Loading branch information
ddunbar committed Dec 28, 2009
1 parent bd845d3 commit 25729e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions buildbot/test/runutils.py
Expand Up @@ -222,15 +222,15 @@ def shutdownSlave(self, slavename, buildername):
def _shutdownSlave_done(self, res, slavename):
del self.slaves[slavename]

def killSlave(self):
def killSlave(self, slavename="bot1", buildername="dummy"):
# the slave has died, its host sent a FIN. The .notifyOnDisconnect
# callbacks will terminate the current step, so the build should be
# flunked (no further steps should be started).
self.slaves['bot1'].bf.continueTrying = 0
bot = self.slaves['bot1'].getServiceNamed("bot")
broker = bot.builders["dummy"].remote.broker
self.slaves[slavename].bf.continueTrying = 0
bot = self.slaves[slavename].getServiceNamed("bot")
broker = bot.builders[buildername].remote.broker
broker.transport.loseConnection()
del self.slaves['bot1']
del self.slaves[slavename]

def disappearSlave(self, slavename="bot1", buildername="dummy",
allowReconnect=False):
Expand Down

0 comments on commit 25729e4

Please sign in to comment.