feat: add bounded task priority and fair application dispatch
This commit is contained in:
@@ -309,11 +309,12 @@ func TestIntegrationKeyedConcurrency(t *testing.T) {
|
||||
sf := newScheduleFixture(t, f)
|
||||
def := sf.definition()
|
||||
def.Task.ConcurrencyKey = "schedule/resource"
|
||||
def.Task.Priority = 7
|
||||
v := sf.create(def)
|
||||
sf.due(v, 2*time.Second)
|
||||
sf.tick()
|
||||
a, ref := f.claim()
|
||||
if a.Task.ConcurrencyKey != def.Task.ConcurrencyKey || a.ConcurrencyToken == 0 {
|
||||
if a.Task.ConcurrencyKey != def.Task.ConcurrencyKey || a.ConcurrencyToken == 0 || a.Task.Priority != 7 {
|
||||
t.Fatal("schedule omitted frozen key")
|
||||
}
|
||||
noKeyClaim(t, f)
|
||||
|
||||
Reference in New Issue
Block a user