Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a70505

Browse files
committed
add more sanity checks to pathman_bgw tests
1 parent0faf90f commit9a70505

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

‎expected/pathman_bgw.out

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ DECLARE
187187
iint4 := 0; -- protect from endless loop
188188
BEGIN
189189
LOOP
190+
-- get total number of processed rows
190191
SELECT processed
191192
FROM pathman_concurrent_part_tasks
192193
WHERE relid = 'test_bgw.conc_part'::regclass
@@ -200,9 +201,12 @@ BEGIN
200201

201202
ASSERT rows IS NOT NULL;
202203

203-
-- rows should increase!
204-
IF rows_old <= rows THEN
204+
IF rows_old = rows THEN
205205
i = i + 1;
206+
ELSIF rows < rows_old THEN
207+
RAISE EXCEPTION 'rows is decreasing: new %, old %', rows, rows_old;
208+
ELSIF rows > 500 THEN
209+
RAISE EXCEPTION 'processed % rows', rows;
206210
END IF;
207211
ELSE
208212
EXIT; -- exit loop

‎sql/pathman_bgw.sql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ DECLARE
101101
iint4 :=0;-- protect from endless loop
102102
BEGIN
103103
LOOP
104+
-- get total number of processed rows
104105
SELECT processed
105106
FROM pathman_concurrent_part_tasks
106107
WHERE relid='test_bgw.conc_part'::regclass
@@ -114,9 +115,12 @@ BEGIN
114115

115116
ASSERT rowsIS NOT NULL;
116117

117-
-- rows should increase!
118-
IF rows_old<= rows THEN
118+
IF rows_old= rows THEN
119119
i= i+1;
120+
ELSIF rows< rows_old THEN
121+
RAISE EXCEPTION'rows is decreasing: new %, old %', rows, rows_old;
122+
ELSIF rows>500 THEN
123+
RAISE EXCEPTION'processed % rows', rows;
120124
END IF;
121125
ELSE
122126
EXIT;-- exit loop

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp