feat: enforce shared application resource quotas across namespaces
This commit is contained in:
@@ -100,6 +100,10 @@ func TestIntegrationSafeRetryUpgrade(t *testing.T) {
|
||||
if err := db.QueryRowContext(ctx, `SELECT unfinished_tasks,max_unfinished_tasks,revision FROM pulse_queues WHERE namespace_id=? AND id=?`, ns, queue).Scan(&unfinished, &maxUnfinished, &queueRevision); err != nil || unfinished != 2 || maxUnfinished != 100000 || queueRevision != 1 {
|
||||
t.Fatalf("resource upgrade changed queue or missed states: count=%d max=%d revision=%d err=%v", unfinished, maxUnfinished, queueRevision, err)
|
||||
}
|
||||
var appCount, appActive, appPending uint64
|
||||
if err := db.QueryRowContext(ctx, `SELECT unfinished_tasks,active_attempts,pending_starts FROM orbit_application_resources WHERE application_id=?`, app).Scan(&appCount, &appActive, &appPending); err != nil || appCount != 2 || appActive != 0 || appPending != 0 {
|
||||
t.Fatalf("application backfill incorrect: %d %d %d %v", appCount, appActive, appPending, err)
|
||||
}
|
||||
for state, id := range ids {
|
||||
var gotState, gotPolicy string
|
||||
var uncertain bool
|
||||
|
||||
Reference in New Issue
Block a user