예제 #1
0
def test_decision_task_cannot_timeout_on_closed_workflow_execution():
    with freeze_time("2015-01-01 12:00:00"):
        wfe = make_workflow_execution()
        wfe.start()

    with freeze_time("2015-01-01 13:55:00"):
        dt = DecisionTask(wfe, 123)
        dt.start(1234)

    with freeze_time("2015-01-01 14:10:00"):
        dt.first_timeout().should.be.a(Timeout)
        wfe.first_timeout().should.be.a(Timeout)
        process_first_timeout(wfe)
        dt.first_timeout().should.be.none
예제 #2
0
def test_decision_task_cannot_timeout_on_closed_workflow_execution():
    with freeze_time("2015-01-01 12:00:00"):
        wfe = make_workflow_execution()
        wfe.start()

    with freeze_time("2015-01-01 13:55:00"):
        dt = DecisionTask(wfe, 123)
        dt.start(1234)

    with freeze_time("2015-01-01 14:10:00"):
        dt.first_timeout().should.be.a(Timeout)
        wfe.first_timeout().should.be.a(Timeout)
        process_first_timeout(wfe)
        dt.first_timeout().should.be.none
예제 #3
0
def test_decision_task_first_timeout():
    wfe = make_workflow_execution()
    dt = DecisionTask(wfe, 123)
    dt.first_timeout().should.be.none

    with freeze_time("2015-01-01 12:00:00"):
        dt.start(1234)
        dt.first_timeout().should.be.none

    # activity task timeout is 300s == 5mins
    with freeze_time("2015-01-01 12:06:00"):
        dt.first_timeout().should.be.a(Timeout)

    dt.complete()
    dt.first_timeout().should.be.none
예제 #4
0
def test_decision_task_first_timeout():
    wfe = make_workflow_execution()
    dt = DecisionTask(wfe, 123)
    dt.first_timeout().should.be.none

    with freeze_time("2015-01-01 12:00:00"):
        dt.start(1234)
        dt.first_timeout().should.be.none

    # activity task timeout is 300s == 5mins
    with freeze_time("2015-01-01 12:06:00"):
        dt.first_timeout().should.be.a(Timeout)

    dt.complete()
    dt.first_timeout().should.be.none