Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b8d4123

Browse files
committed
The second permutation was uncommented. We need to fix something.
1 parent 2cfb4ac commit b8d4123

File tree

2 files changed

+65
-7
lines changed

2 files changed

+65
-7
lines changed

src/test/isolation/expected/snapfs_set_backend_snapshot_table.out

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ step s2_tab_u:
2323
update foo set name = name || '_upd_sess_2';
2424

2525
step s1_tab_s:
26-
select * from foo;
26+
select * from foo order by id;
2727

2828
id name
2929

@@ -43,7 +43,7 @@ pg_set_backend_snapshot
4343

4444

4545
step s1_tab_s:
46-
select * from foo;
46+
select * from foo order by id;
4747

4848
id name
4949

@@ -64,7 +64,7 @@ step s2_tab_u:
6464
update foo set name = name || '_upd_sess_2';
6565

6666
step s1_tab_s:
67-
select * from foo;
67+
select * from foo order by id;
6868

6969
id name
7070

@@ -87,7 +87,7 @@ step s2_tab_u:
8787
update foo set name = name || '_upd_sess_2';
8888

8989
step s1_tab_s:
90-
select * from foo;
90+
select * from foo order by id;
9191

9292
id name
9393

@@ -100,3 +100,61 @@ id name
100100

101101
1 some_text_sess_1_upd_sess_2_upd_sess_2_upd_sess_2
102102
2 some_text_sess_2_upd_sess_2_upd_sess_2_upd_sess_2
103+
104+
starting permutation: s1_mk_sn s1_tab_i s2_tab_i s1_mk_sn s2_tab_u s1_sb_sn_1 s1_tab_s s2_rm_sn_1 s1_sb_sn_0 s1_tab_s s2_tab_s
105+
step s1_mk_sn:
106+
select 1 as "make_snapshot" from pg_make_snapshot();
107+
108+
make_snapshot
109+
110+
1
111+
step s1_tab_i:
112+
insert into foo ( name ) values ( 'some_text_sess_1' );
113+
114+
step s2_tab_i:
115+
insert into foo ( name ) values ( 'some_text_sess_2' );
116+
117+
step s1_mk_sn:
118+
select 1 as "make_snapshot" from pg_make_snapshot();
119+
120+
make_snapshot
121+
122+
1
123+
step s2_tab_u:
124+
update foo set name = name || '_upd_sess_2';
125+
126+
step s1_sb_sn_1:
127+
select pg_set_backend_snapshot( ( select recent_snapshot - 1 from pg_control_snapshot() ) );
128+
129+
pg_set_backend_snapshot
130+
131+
132+
step s1_tab_s:
133+
select * from foo order by id;
134+
135+
id name
136+
137+
step s2_rm_sn_1:
138+
select pg_remove_snapshot( ( select recent_snapshot - 1 from pg_control_snapshot() ) );
139+
140+
pg_remove_snapshot
141+
142+
143+
step s1_sb_sn_0:
144+
select pg_set_backend_snapshot( 0 );
145+
146+
ERROR: Snapshot 51 is not valid any more
147+
step s1_tab_s:
148+
select * from foo order by id;
149+
150+
id name
151+
152+
1 some_text_sess_1_upd_sess_2
153+
2 some_text_sess_2_upd_sess_2
154+
step s2_tab_s:
155+
select * from foo;
156+
157+
id name
158+
159+
1 some_text_sess_1_upd_sess_2
160+
2 some_text_sess_2_upd_sess_2

src/test/isolation/specs/snapfs_set_backend_snapshot_table.spec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ setup {
77
teardown {
88
select pg_set_backend_snapshot( 0 );
99
select pg_remove_snapshot( ( select recent_snapshot from pg_control_snapshot() ) );
10-
drop table foo;
10+
DROP TABLE IF EXISTS foo;
1111
}
1212

1313
session "s1"
@@ -32,7 +32,7 @@ step "s1_tab_i" {
3232
}
3333

3434
step "s1_tab_s" {
35-
select * from foo;
35+
select * from foo order by id;
3636
}
3737

3838
session "s2"
@@ -53,4 +53,4 @@ step "s2_rm_sn_1" {
5353
}
5454

5555
permutation "s1_mk_sn" "s1_tab_i" "s2_tab_i" "s1_mk_sn" "s2_tab_u" "s1_tab_s" "s2_tab_s" "s1_sb_sn_1" "s1_tab_s" "s2_tab_s" "s1_sb_sn_2" "s2_tab_u" "s1_tab_s" "s2_tab_s" "s1_sb_sn_0" "s2_tab_u" "s1_tab_s" "s2_tab_s"
56-
#permutation "s1_mk_sn" "s1_tab_i" "s2_tab_i" "s1_mk_sn" "s2_tab_u" "s1_sb_sn_1" "s1_tab_s" "s2_rm_sn_1" "s1_sb_sn_0" "s1_tab_s" "s2_tab_s"
56+
permutation "s1_mk_sn" "s1_tab_i" "s2_tab_i" "s1_mk_sn" "s2_tab_u" "s1_sb_sn_1" "s1_tab_s" "s2_rm_sn_1" "s1_sb_sn_0" "s1_tab_s" "s2_tab_s"

0 commit comments

Comments
 (0)