Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PGPRO-9336] Fixed output of isolation tests #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,3 @@ env:
- PG_VERSION=13 LEVEL=hardcore
- PG_VERSION=12
- PG_VERSION=12 LEVEL=hardcore
- PG_VERSION=11
- PG_VERSION=11 LEVEL=hardcore

matrix:
allow_failures:
- env: PG_VERSION=11
- env: PG_VERSION=11 LEVEL=hardcore
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ REGRESS = security rum rum_validate rum_hash ruminv timestamp orderby orderby_ha

TAP_TESTS = 1

ISOLATION = predicate-rum predicate-rum-2
ISOLATION_OPTS = --load-extension=rum
EXTRA_CLEAN = pglist_tmp

ifdef USE_PGXS
Expand Down Expand Up @@ -71,8 +73,10 @@ rum--$(EXTVERSION).sql: $(DATA_first) $(DATA_updates)
rum--%.sql: gen_rum_sql--%.pl
perl $< > $@

install: installincludes

#
# Make conditional targets to save backward compatibility with PG11, PG10 and PG9.6.
#
ifeq ($(MAJORVERSION), $(filter 9.6% 10% 11%, $(MAJORVERSION)))
installincludes:
$(INSTALL) -d '$(DESTDIR)$(includedir_server)/'
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(RELATIVE_INCLUDES)) '$(DESTDIR)$(includedir_server)/'
Expand All @@ -94,3 +98,4 @@ isolationcheck: | submake-isolation submake-rum temp-install
$(pg_isolation_regress_check) \
--temp-config $(top_srcdir)/contrib/rum/logical.conf \
$(ISOLATIONCHECKS)
endif
600 changes: 340 additions & 260 deletions expected/predicate-rum-2.out

Large diffs are not rendered by default.

501 changes: 0 additions & 501 deletions expected/predicate-rum-2_1.out

This file was deleted.

622 changes: 342 additions & 280 deletions expected/predicate-rum.out

Large diffs are not rendered by default.

521 changes: 0 additions & 521 deletions expected/predicate-rum_1.out

This file was deleted.

21 changes: 11 additions & 10 deletions specs/predicate-rum-2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@

setup
{
CREATE EXTENSION rum;

CREATE TABLE rum_tbl (id serial, tsv tsvector);

CREATE TABLE text_table (id1 serial, t text[]);

SELECT SETSEED(0.5);

INSERT INTO text_table(t) SELECT array[chr(i) || chr(j)] FROM generate_series(65,90) i,
generate_series(65,90) j ;

INSERT INTO rum_tbl(tsv) SELECT to_tsvector('simple', t[1] ) FROM text_table;

DO $$
DECLARE
c integer := 17;
a integer := 261;
m integer := 6760;
Xi integer := 228;
BEGIN
FOR j in 1..10 LOOP
UPDATE rum_tbl SET tsv = tsv || q.t1 FROM (SELECT id1,to_tsvector('simple', t[1] )
as t1 FROM text_table) as q WHERE id = (random()*q.id1)::integer;
FOR i in 1..338 LOOP
INSERT INTO rum_tbl(tsv) VALUES ('');
FOR j in 1..10 LOOP
UPDATE rum_tbl SET tsv = tsv || (SELECT to_tsvector(t[1]) FROM text_table WHERE id1 = Xi % 676 + 1) WHERE id = i;
Xi = (a * Xi + c) % m;
END LOOP;
END LOOP;
END;
$$;
Expand All @@ -35,7 +37,6 @@ teardown
{
DROP TABLE text_table;
DROP TABLE rum_tbl;
DROP EXTENSION rum;
}

session "s1"
Expand Down
21 changes: 11 additions & 10 deletions specs/predicate-rum.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@

setup
{
CREATE EXTENSION rum;

CREATE TABLE rum_tbl (id serial, tsv tsvector);

CREATE TABLE text_table (id1 serial, t text[]);

SELECT SETSEED(0.5);

INSERT INTO text_table(t) SELECT array[chr(i) || chr(j)] FROM generate_series(65,90) i,
generate_series(65,90) j ;

INSERT INTO rum_tbl(tsv) SELECT to_tsvector('simple', t[1] ) FROM text_table;

DO $$
DECLARE
c integer := 17;
a integer := 261;
m integer := 6760;
Xi integer := 228;
BEGIN
FOR j in 1..10 LOOP
UPDATE rum_tbl SET tsv = tsv || q.t1 FROM (SELECT id1,to_tsvector('simple', t[1] )
as t1 FROM text_table) as q WHERE id = (random()*q.id1)::integer;
FOR i in 1..338 LOOP
INSERT INTO rum_tbl(tsv) VALUES ('');
FOR j in 1..10 LOOP
UPDATE rum_tbl SET tsv = tsv || (SELECT to_tsvector(t[1]) FROM text_table WHERE id1 = Xi % 676 + 1) WHERE id = i;
Xi = (a * Xi + c) % m;
END LOOP;
END LOOP;
END;
$$;
Expand All @@ -35,7 +37,6 @@ teardown
{
DROP TABLE text_table;
DROP TABLE rum_tbl;
DROP EXTENSION rum;
}

session "s1"
Expand Down