Skip to content

Commit 9c18104

Browse files
committed
Simplify sequence test
We maintained two separate expected files because log_cnt could be one of two values. Rewrite the test so that we only need one file. Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
1 parent e8ee3d6 commit 9c18104

File tree

3 files changed

+9
-564
lines changed

3 files changed

+9
-564
lines changed

src/test/regress/expected/sequence.out

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,12 @@ SELECT nextval('foo_seq_new');
190190
2
191191
(1 row)
192192

193-
SELECT * FROM foo_seq_new;
194-
last_value | log_cnt | is_called
195-
------------+---------+-----------
196-
2 | 31 | t
193+
-- log_cnt can be higher if there is a checkpoint just at the right
194+
-- time, so just test for the expected range
195+
SELECT last_value, log_cnt IN (31, 32) AS log_cnt_ok, is_called FROM foo_seq_new;
196+
last_value | log_cnt_ok | is_called
197+
------------+------------+-----------
198+
2 | t | t
197199
(1 row)
198200

199201
DROP SEQUENCE foo_seq_new;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy