Commit eeefd42
committed
Add TAP tests for timeouts
This commit adds new tests to verify that transaction_timeout,
idle_session_timeout, and idle_in_transaction_session_timeout work as expected.
We introduce new injection points in before throwing a timeout FATAL error
and check these injection points are reached.
Discussion: https://postgr.es/m/CAAhFRxiQsRs2Eq5kCo9nXE3HTugsAAJdSQSmxncivebAxdmBjQ%40mail.gmail.com
Author: Andrey Borodin
Reviewed-by: Alexander Korotkov1 parent e85662d commit eeefd42Copy full SHA for eeefd42
File tree
Expand file treeCollapse file tree
4 files changed
+147
-0
lines changedOpen diff view settings
Filter options
- src
- backend/tcop
- test/modules/test_misc
- t
Expand file treeCollapse file tree
4 files changed
+147
-0
lines changedOpen diff view settings
Collapse file
src/backend/tcop/postgres.c
Copy file name to clipboardExpand all lines: src/backend/tcop/postgres.c+10Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
72 | 72 | |
73 | 73 | |
74 | 74 | |
| 75 | + |
75 | 76 | |
76 | 77 | |
77 | 78 | |
| ||
3411 | 3412 | |
3412 | 3413 | |
3413 | 3414 | |
| 3415 | + |
| 3416 | + |
3414 | 3417 | |
3415 | 3418 | |
3416 | 3419 | |
| 3420 | + |
3417 | 3421 | |
3418 | 3422 | |
3419 | 3423 | |
| ||
3422 | 3426 | |
3423 | 3427 | |
3424 | 3428 | |
| 3429 | + |
| 3430 | + |
3425 | 3431 | |
3426 | 3432 | |
3427 | 3433 | |
| 3434 | + |
3428 | 3435 | |
3429 | 3436 | |
3430 | 3437 | |
| ||
3433 | 3440 | |
3434 | 3441 | |
3435 | 3442 | |
| 3443 | + |
| 3444 | + |
3436 | 3445 | |
3437 | 3446 | |
3438 | 3447 | |
| 3448 | + |
3439 | 3449 | |
3440 | 3450 | |
3441 | 3451 | |
|
Collapse file
src/test/modules/test_misc/Makefile
Copy file name to clipboardExpand all lines: src/test/modules/test_misc/Makefile+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
5 | 9 | |
6 | 10 | |
7 | 11 | |
|
Collapse file
src/test/modules/test_misc/meson.build
Copy file name to clipboardExpand all lines: src/test/modules/test_misc/meson.build+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
5 | 5 | |
6 | 6 | |
7 | 7 | |
| 8 | + |
| 9 | + |
| 10 | + |
8 | 11 | |
9 | 12 | |
10 | 13 | |
11 | 14 | |
12 | 15 | |
| 16 | + |
13 | 17 | |
14 | 18 | |
15 | 19 | |
Collapse file
src/test/modules/test_misc/t/005_timeouts.pl
Copy file name to clipboard+129Lines changed: 129 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
0 commit comments