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

Commit 561a090

Browse files
committed
snapfs_set_backend_snapshot_table test passed
1 parent fc7e8ea commit 561a090

File tree

3 files changed

+59
-4
lines changed

3 files changed

+59
-4
lines changed

src/test/isolation/expected/snapfs_get_snapshot_size.out

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,3 @@ pg_get_snapshot_size
1616
size_not_zero
1717

1818
t
19-
pg_remove_snapshot
20-
21-

src/test/isolation/snap_schedule

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
test: snapfs_switch_to_snapshot_three_backends
22
test: snapfs_switch_to_snapshot_sequence
33
test: snapfs_revert_to_snapshot_sequence
4+
test: snapfs_revert_to_snapshot_table
45
test: snapfs_set_backend_snapshot_sequence
6+
test: snapfs_set_backend_snapshot_table
7+
test: snapfs_get_snapshot_size
58
test: snapfs_get_snapshot_timestamp
6-
test: snapfs_revert_to_snapshot_table
79
test: snapfs_switch_to_snapshot_table
810
test: snapfs_switch_to_snapshot_temp_table
911
test: snapfs_switch_to_snapshot_temp_table_2
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Table testing.
2+
3+
setup {
4+
create table foo( id serial not null primary key, name varchar );
5+
}
6+
7+
teardown {
8+
select pg_set_backend_snapshot( 0 );
9+
select pg_remove_snapshot( ( select recent_snapshot from pg_control_snapshot() ) );
10+
drop table foo;
11+
}
12+
13+
session "s1"
14+
step "s1_mk_sn" {
15+
select 1 as "make_snapshot" from pg_make_snapshot();
16+
}
17+
18+
step "s1_sb_sn_1" {
19+
select pg_set_backend_snapshot( ( select recent_snapshot - 1 from pg_control_snapshot() ) );
20+
}
21+
22+
step "s1_sb_sn_2" {
23+
select pg_set_backend_snapshot( ( select recent_snapshot from pg_control_snapshot() ) );
24+
}
25+
26+
step "s1_sb_sn_0" {
27+
select pg_set_backend_snapshot( 0 );
28+
}
29+
30+
step "s1_tab_i" {
31+
insert into foo ( name ) values ( 'some_text_sess_1' );
32+
}
33+
34+
step "s1_tab_s" {
35+
select * from foo;
36+
}
37+
38+
session "s2"
39+
step "s2_tab_i" {
40+
insert into foo ( name ) values ( 'some_text_sess_2' );
41+
}
42+
43+
step "s2_tab_u" {
44+
update foo set name = name || '_upd_sess_2';
45+
}
46+
47+
step "s2_tab_s" {
48+
select * from foo;
49+
}
50+
51+
step "s2_rm_sn_1" {
52+
select pg_remove_snapshot( ( select recent_snapshot - 1 from pg_control_snapshot() ) );
53+
}
54+
55+
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"

0 commit comments

Comments
 (0)