File tree Expand file tree Collapse file tree 3 files changed +59
-4
lines changed Expand file tree Collapse file tree 3 files changed +59
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,3 @@ pg_get_snapshot_size
16
16
size_not_zero
17
17
18
18
t
19
- pg_remove_snapshot
20
-
21
-
Original file line number Diff line number Diff line change 1
1
test: snapfs_switch_to_snapshot_three_backends
2
2
test: snapfs_switch_to_snapshot_sequence
3
3
test: snapfs_revert_to_snapshot_sequence
4
+ test: snapfs_revert_to_snapshot_table
4
5
test: snapfs_set_backend_snapshot_sequence
6
+ test: snapfs_set_backend_snapshot_table
7
+ test: snapfs_get_snapshot_size
5
8
test: snapfs_get_snapshot_timestamp
6
- test: snapfs_revert_to_snapshot_table
7
9
test: snapfs_switch_to_snapshot_table
8
10
test: snapfs_switch_to_snapshot_temp_table
9
11
test: snapfs_switch_to_snapshot_temp_table_2
Original file line number Diff line number Diff line change
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"
You can’t perform that action at this time.
0 commit comments