mirror of https://github.com/citusdata/citus.git
Introduce one new alternative text output to fix flakiness (#5913)
Here is a flaky test output that is quite hard to fix:
```diff
diff -dU10 -w /home/circleci/project/src/test/regress/expected/isolation_master_update_node_1.out /home/circleci/project/src/test/regress/results/isolation_master_update_node.out
--- /home/circleci/project/src/test/regress/expected/isolation_master_update_node_1.out.modified 2022-03-21 19:03:54.237042562 +0000
+++ /home/circleci/project/src/test/regress/results/isolation_master_update_node.out.modified 2022-03-21 19:03:54.257043084 +0000
@@ -49,18 +49,20 @@
<waiting ...>
step s2-update-node-1-force: <... completed>
master_update_node
------------------
(1 row)
step s2-abort: ABORT;
step s1-abort: ABORT;
FATAL: terminating connection due to administrator command
-SSL connection has been closed unexpectedly
+server closed the connection unexpectedly
+ This probably means the server terminated abnormally
+ before or while processing the request.
```
I could not come up with a solution that would decrease the flakiness in the test outputs. We already have 3 output files for the same test and now I introduced a 4th one.
I can also add complex regular expressions that span multiple lines, and normalize these error messages. Feel free to suggest a normalized error message in a comment here.
## Current alternative file contents
`isolation_master_update_node.out`
```
step s1-abort: ABORT;
FATAL: terminating connection due to administrator command
FATAL: terminating connection due to administrator command
SSL connection has been closed unexpectedly
```
`isolation_master_update_node_0.out`
```
step s1-abort: ABORT;
WARNING: this step had a leftover error message
FATAL: terminating connection due to administrator command
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
```
`isolation_master_update_node_1.out`
```
step s1-abort: ABORT;
FATAL: terminating connection due to administrator command
SSL connection has been closed unexpectedly
```
new file: `isolation_master_update_node_2.out`
```
step s1-abort: ABORT;
FATAL: terminating connection due to administrator command
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
```
(cherry picked from commit 518fb0873e
)
pull/6363/head
parent
4d21903d3e
commit
0ae1c630cf
|
@ -0,0 +1,68 @@
|
||||||
|
Parsed test spec with 2 sessions
|
||||||
|
|
||||||
|
starting permutation: s1-begin s1-insert s2-begin s2-update-node-1 s1-abort s2-abort
|
||||||
|
create_distributed_table
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
step s1-begin: BEGIN;
|
||||||
|
step s1-insert: INSERT INTO t1 SELECT generate_series(1, 100);
|
||||||
|
step s2-begin: BEGIN;
|
||||||
|
step s2-update-node-1:
|
||||||
|
-- update a specific node by address
|
||||||
|
SELECT master_update_node(nodeid, 'localhost', nodeport + 10)
|
||||||
|
FROM pg_dist_node
|
||||||
|
WHERE nodename = 'localhost'
|
||||||
|
AND nodeport = 57637;
|
||||||
|
<waiting ...>
|
||||||
|
step s1-abort: ABORT;
|
||||||
|
step s2-update-node-1: <... completed>
|
||||||
|
master_update_node
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
step s2-abort: ABORT;
|
||||||
|
master_remove_node
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
(2 rows)
|
||||||
|
|
||||||
|
|
||||||
|
starting permutation: s1-begin s1-insert s2-begin s2-update-node-1-force s2-abort s1-abort
|
||||||
|
create_distributed_table
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
step s1-begin: BEGIN;
|
||||||
|
step s1-insert: INSERT INTO t1 SELECT generate_series(1, 100);
|
||||||
|
step s2-begin: BEGIN;
|
||||||
|
step s2-update-node-1-force:
|
||||||
|
-- update a specific node by address (force)
|
||||||
|
SELECT master_update_node(nodeid, 'localhost', nodeport + 10, force => true, lock_cooldown => 100)
|
||||||
|
FROM pg_dist_node
|
||||||
|
WHERE nodename = 'localhost'
|
||||||
|
AND nodeport = 57637;
|
||||||
|
<waiting ...>
|
||||||
|
step s2-update-node-1-force: <... completed>
|
||||||
|
master_update_node
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
step s2-abort: ABORT;
|
||||||
|
step s1-abort: ABORT;
|
||||||
|
FATAL: terminating connection due to administrator command
|
||||||
|
server closed the connection unexpectedly
|
||||||
|
This probably means the server terminated abnormally
|
||||||
|
before or while processing the request.
|
||||||
|
|
||||||
|
master_remove_node
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
(2 rows)
|
||||||
|
|
Loading…
Reference in New Issue