Skip to content

Commit

Permalink
Use latest version of ResilientFunctions
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Jul 14, 2024
1 parent 9309700 commit d89cd46
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cleipnir.Flows.Tests/Flows/FlowsWithResultTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public override async Task<int> Run(string param)
{
await Task.Delay(1);
ExecutedWithParameter = param;
InstanceId = Workflow.FunctionId.InstanceId.ToString();
InstanceId = Workflow.FlowId.Instance.ToString();

return 1;
}
Expand Down Expand Up @@ -119,7 +119,7 @@ await Should.ThrowAsync<ArgumentException>(() =>
controlPanel.Status.ShouldBe(Status.Failed);

FailingFuncFlow.ShouldThrow = false;
await controlPanel.ReInvoke();
await controlPanel.Restart();

await controlPanel.Refresh();
controlPanel.Status.ShouldBe(Status.Succeeded);
Expand Down
2 changes: 1 addition & 1 deletion Cleipnir.Flows.Tests/Flows/OptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public async Task FlowNameCanBeSpecifiedFromTheOutside()
var flows = sp.GetRequiredService<SimpleFlows>();
await flows.Run("Id");
var store = sp.GetRequiredService<IFunctionStore>();
var sf = await store.GetFunction(new FunctionId("SomeOtherFlowName", "Id"));
var sf = await store.GetFunction(new FlowId("SomeOtherFlowName", "Id"));
sf.ShouldNotBeNull();
sf.Status.ShouldBe(Status.Succeeded);
}
Expand Down
4 changes: 2 additions & 2 deletions Cleipnir.Flows.Tests/Flows/ParamlessFlowsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class SimpleParamlessFlow : Flow
public override async Task Run()
{
await Task.Delay(1);
InstanceId = Workflow.FunctionId.InstanceId.ToString();
InstanceId = Workflow.FlowId.Instance.ToString();
}
}

Expand Down Expand Up @@ -109,7 +109,7 @@ await Should.ThrowAsync<TimeoutException>(() =>
controlPanel.Status.ShouldBe(Status.Failed);

FailingParamlessFlow.ShouldThrow = false;
await controlPanel.ReInvoke();
await controlPanel.Restart();

await controlPanel.Refresh();
controlPanel.Status.ShouldBe(Status.Succeeded);
Expand Down
4 changes: 2 additions & 2 deletions Cleipnir.Flows.Tests/Flows/UnitFlowsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override async Task Run(string param)
{
await Task.Delay(1);
ExecutedWithParameter = param;
InstanceId = Workflow.FunctionId.InstanceId.ToString();
InstanceId = Workflow.FlowId.Instance.ToString();
}
}

Expand Down Expand Up @@ -112,7 +112,7 @@ await Should.ThrowAsync<TimeoutException>(() =>
controlPanel.Status.ShouldBe(Status.Failed);

FailingUnitFlow.ShouldThrow = false;
await controlPanel.ReInvoke();
await controlPanel.Restart();

await controlPanel.Refresh();
controlPanel.Status.ShouldBe(Status.Succeeded);
Expand Down
2 changes: 1 addition & 1 deletion Cleipnir.ResilientFunctions
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task<ActionResult> Post(string orderNumber)
return NotFound();

await controlPanel.Effects.Remove("ShipProducts");
await controlPanel.ReInvoke();
await controlPanel.Restart();

return Ok();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public static async Task Do()

var controlPanel = await flows.ControlPanel(flowId);
controlPanel!.Param = "valid parameter";
await controlPanel.ReInvoke();
await controlPanel.Restart();
}
}

0 comments on commit d89cd46

Please sign in to comment.