Merge pull request #2761 from bblommers/bugfix/1427
EMR - Return start time of first step
This commit is contained in:
commit
a89c150627
@ -86,6 +86,9 @@ class FakeStep(BaseModel):
|
||||
self.start_datetime = None
|
||||
self.state = state
|
||||
|
||||
def start(self):
|
||||
self.start_datetime = datetime.now(pytz.utc)
|
||||
|
||||
|
||||
class FakeCluster(BaseModel):
|
||||
def __init__(
|
||||
@ -204,6 +207,8 @@ class FakeCluster(BaseModel):
|
||||
|
||||
self.start_cluster()
|
||||
self.run_bootstrap_actions()
|
||||
if self.steps:
|
||||
self.steps[0].start()
|
||||
|
||||
@property
|
||||
def instance_groups(self):
|
||||
|
@ -835,7 +835,7 @@ LIST_STEPS_TEMPLATE = """<ListStepsResponse xmlns="http://elasticmapreduce.amazo
|
||||
{% if step.end_datetime is not none %}
|
||||
<EndDateTime>{{ step.end_datetime.isoformat() }}</EndDateTime>
|
||||
{% endif %}
|
||||
{% if step.ready_datetime is not none %}
|
||||
{% if step.start_datetime is not none %}
|
||||
<StartDateTime>{{ step.start_datetime.isoformat() }}</StartDateTime>
|
||||
{% endif %}
|
||||
</Timeline>
|
||||
|
@ -752,7 +752,9 @@ def test_steps():
|
||||
# StateChangeReason
|
||||
x["Status"]["Timeline"]["CreationDateTime"].should.be.a("datetime.datetime")
|
||||
# x['Status']['Timeline']['EndDateTime'].should.be.a('datetime.datetime')
|
||||
# x['Status']['Timeline']['StartDateTime'].should.be.a('datetime.datetime')
|
||||
# Only the first step will have started - we don't know anything about when it finishes, so the second step never starts
|
||||
if x["Name"] == "My wordcount example":
|
||||
x["Status"]["Timeline"]["StartDateTime"].should.be.a("datetime.datetime")
|
||||
|
||||
x = client.describe_step(ClusterId=cluster_id, StepId=x["Id"])["Step"]
|
||||
x["ActionOnFailure"].should.equal("TERMINATE_CLUSTER")
|
||||
|
Loading…
Reference in New Issue
Block a user