Add truncate first isolation tests

pull/1382/head
Metin Doslu 2017-05-08 17:07:03 +03:00 committed by Marco Slot
parent a8f368fced
commit 37026dc351
2 changed files with 92 additions and 3 deletions

View File

@ -160,3 +160,83 @@ step s2-drop-all-shards: <... completed>
master_drop_all_shards
0
starting permutation: s1-begin s1-truncate s2-truncate s1-commit
?column?
1
step s1-begin:
BEGIN;
step s1-truncate:
TRUNCATE append_table;
step s2-truncate:
TRUNCATE append_table;
<waiting ...>
step s1-commit:
COMMIT;
step s2-truncate: <... completed>
starting permutation: s1-begin s1-truncate s2-apply-delete-command s1-commit
?column?
1
step s1-begin:
BEGIN;
step s1-truncate:
TRUNCATE append_table;
step s2-apply-delete-command:
SELECT master_apply_delete_command('DELETE FROM append_table');
<waiting ...>
step s1-commit:
COMMIT;
step s2-apply-delete-command: <... completed>
master_apply_delete_command
0
starting permutation: s1-begin s1-truncate s2-drop-all-shards s1-commit
?column?
1
step s1-begin:
BEGIN;
step s1-truncate:
TRUNCATE append_table;
step s2-drop-all-shards:
SELECT master_drop_all_shards('append_table', 'public', 'append_table');
<waiting ...>
step s1-commit:
COMMIT;
step s2-drop-all-shards: <... completed>
master_drop_all_shards
0
starting permutation: s1-begin s1-truncate s2-select s1-commit
?column?
1
step s1-begin:
BEGIN;
step s1-truncate:
TRUNCATE append_table;
step s2-select:
SELECT * FROM append_table;
<waiting ...>
step s1-commit:
COMMIT;
step s2-select: <... completed>
test_id data

View File

@ -20,6 +20,11 @@ step "s1-begin"
BEGIN;
}
step "s1-truncate"
{
TRUNCATE append_table;
}
step "s1-apply-delete-command"
{
SELECT master_apply_delete_command('DELETE FROM append_table');
@ -62,10 +67,14 @@ permutation "s1-begin" "s1-drop-all-shards" "s2-apply-delete-command" "s1-commit
permutation "s1-begin" "s1-drop-all-shards" "s2-drop-all-shards" "s1-commit"
permutation "s1-begin" "s1-drop-all-shards" "s2-select" "s1-commit"
# We can't verify master_apply_delete_command + SELECT since it blocks on the
# the workers, but this is not visible on the master, meaning the isolation
# test cannot proceed.
permutation "s1-begin" "s1-apply-delete-command" "s2-truncate" "s1-commit"
permutation "s1-begin" "s1-apply-delete-command" "s2-apply-delete-command" "s1-commit"
permutation "s1-begin" "s1-apply-delete-command" "s2-drop-all-shards" "s1-commit"
# We can't verify master_apply_delete_command + SELECT since it blocks on the
# the workers, but this is not visible on the master, meaning the isolation
# test cannot proceed.
permutation "s1-begin" "s1-truncate" "s2-truncate" "s1-commit"
permutation "s1-begin" "s1-truncate" "s2-apply-delete-command" "s1-commit"
permutation "s1-begin" "s1-truncate" "s2-drop-all-shards" "s1-commit"
permutation "s1-begin" "s1-truncate" "s2-select" "s1-commit"