Collect costs for dispatched model attempts
This commit is contained in:
@@ -19,10 +19,15 @@ func TestExecutionBoundaryPreservesCallerContext(t *testing.T) {
|
||||
recorder := newRecorder("outer", time.Now, nil)
|
||||
sink := recorder
|
||||
parent = WithClaimSink(WithRecorder(parent, recorder), &sink)
|
||||
var cost CostAccumulator
|
||||
parent = WithCostAccumulator(parent, &cost)
|
||||
child := WithoutExecutionState(parent)
|
||||
if FromContext(child) != nil || FromContext(parent) != recorder {
|
||||
t.Fatal("execution boundary did not isolate recorder state")
|
||||
}
|
||||
if CostFromContext(child) != nil || CostFromContext(parent) != &cost {
|
||||
t.Fatal("execution boundary did not isolate cost state")
|
||||
}
|
||||
RegisterClaim(child, nil)
|
||||
if sink != recorder {
|
||||
t.Fatal("execution boundary retained the parent claim sink")
|
||||
|
||||
Reference in New Issue
Block a user