Add a total maximum time that a machine is allowed to stick around before we terminate it more forcefully.

This commit is contained in:
Jake Moshenko 2014-12-23 11:18:10 -05:00
parent aac7feb20b
commit 055a6b0c37
2 changed files with 17 additions and 3 deletions

View file

@ -159,8 +159,13 @@ class TestEphemeral(unittest.TestCase):
@async_test
def test_heartbeat_response(self):
expiration_timestamp = time.time() + 60
builder_result = Mock(spec=etcd.EtcdResult)
builder_result.value = {'builder_id': '123', 'expiration': '123'}
builder_result.value = {
'builder_id': '123',
'expiration': expiration_timestamp,
'max_expiration': expiration_timestamp,
}
self.etcd_client_mock.read = Mock(return_value=builder_result)
yield From(self.manager.job_heartbeat(self.mock_job))