Make GIN test using injection points repeatable
authorMichael Paquier <michael@paquier.xyz>
Sun, 7 Apr 2024 23:45:04 +0000 (08:45 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sun, 7 Apr 2024 23:45:04 +0000 (08:45 +0900)
As written, the test would fail when run repeatedly because one of the
injection points attached was not detached.  This would not matter if
the test is rewritten to be concurrently safe, but let's be clean and
it is a good practice.

Oversight in 6a1ea02c491d.

Discussion: https://postgr.es/m/ZfP7IDs9TvrKe49x@paquier.xyz

src/test/modules/gin/expected/gin_incomplete_splits.out
src/test/modules/gin/sql/gin_incomplete_splits.sql

index 822b78cffc41dc42f6f49266c31ceb55b5fe3af0..973a8ce6c84c0d238c567b12356b706b4c9f4580 100644 (file)
@@ -179,3 +179,9 @@ select verify(:next_i);
  t
 (1 row)
 
+SELECT injection_points_detach('gin-finish-incomplete-split');
+ injection_points_detach 
+-------------------------
+(1 row)
+
index 71253b71f3d0132081dfd95c2dcc4560f68acbab..ea3667b38d0f485b701e3911f6d1986cb4f1f15f 100644 (file)
@@ -143,3 +143,5 @@ select insert_n(:next_i, 10) as next_i
 \gset
 -- Verify that a scan still works
 select verify(:next_i);
+
+SELECT injection_points_detach('gin-finish-incomplete-split');