Align reservation SQL check with v17 outcomes
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (postgres) (push) Failing after 34m51s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
dingo
2026-10-10 18:47:14 -04:00
parent d9032253bd
commit ecbad78267
3 changed files with 12 additions and 7 deletions
+2 -6
View File
@@ -19,11 +19,6 @@ SELECT 1 / ((:life_identity = 1)::int);
SELECT set_config('test.holder', :'lease_holder', false),
set_config('test.epoch', :'lease_epoch', false);
DO $$ BEGIN
BEGIN
PERFORM evolution.reserve_primitive_life(9750,1,current_setting('test.holder')::uuid,
current_setting('test.epoch')::numeric,'11111111-1111-1111-1111-111111111111',1,11,1);
RAISE EXCEPTION 'accepted a second outstanding life';
EXCEPTION WHEN SQLSTATE 'EVL16' THEN NULL; END;
BEGIN
PERFORM evolution.reserve_primitive_life(9750,1,current_setting('test.holder')::uuid,
current_setting('test.epoch')::numeric,'11111111-1111-1111-1111-111111111111',99,10,1);
@@ -46,7 +41,8 @@ SELECT 1 / ((evolution.reject_primitive_life(9750,1,:'lease_holder',:lease_epoch
'11111111-1111-1111-1111-111111111111',1,10,2::smallint) = 1)::int);
SELECT * FROM evolution.reserve_primitive_life(9750,1,:'lease_holder',:lease_epoch,
'11111111-1111-1111-1111-111111111111',1,11,1) \gset
SELECT 1 / ((:life_identity = 2)::int);
-- The conflicting request keeps its own allocated identity and immutable refusal.
SELECT 1 / ((:life_identity = 2 AND :rejection = 4)::int);
SELECT * FROM evolution.reserve_primitive_life(9750,1,:'lease_holder',:lease_epoch,
'11111111-1111-1111-1111-111111111111',1,10,1) \gset
SELECT 1 / ((:life_identity = 1 AND :rejection = 1)::int);