EEBus: abort run loop and limit assertion on context cancellation (#32494)
This commit is contained in:
parent
4a878838e7
commit
fed3fb731c
8 changed files with 54 additions and 12 deletions
|
|
@ -189,7 +189,7 @@ func (c *EEBusOHPCF) UseCaseEvent(_ spineapi.DeviceRemoteInterface, entity spine
|
|||
c.egLpcEntity = entity
|
||||
|
||||
// [LPC-913]: state the limit to the newly available CS
|
||||
go eebus.AssertLimit(c.log, func() error { return c.Dim(c.lastDimmed()) })
|
||||
go eebus.AssertLimit(c.ctx, c.log, func() error { return c.Dim(c.lastDimmed()) })
|
||||
}
|
||||
c.mu.Unlock()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ func newOHPCFEGCharger(t *testing.T) (*EEBusOHPCF, *egmocks.EgLPCInterface, spin
|
|||
entity := spinemocks.NewEntityRemoteInterface(t)
|
||||
|
||||
c := &EEBusOHPCF{
|
||||
ctx: t.Context(),
|
||||
log: util.NewLogger("eebus-ohpcf-test"),
|
||||
eg: &eebus.EnergyGuard{EgLPCInterface: lpc},
|
||||
egLpcEntity: entity,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue