Skip to content

Commit 438e845

Browse files
test_pg_ctl_wait_option is updated (#213)
When node is not stopped, we read and output a content of node log file to provide an additional information about this problem. It should help find a reason of unexpected problem with this test in CI.
1 parent 1a4655c commit 438e845

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

tests/test_simple.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,19 @@ def test_pg_ctl_wait_option(self):
438438
nAttempt = 0
439439
while True:
440440
if nAttempt == C_MAX_ATTEMPTS:
441+
#
442+
# [2025-03-11]
443+
# We have an unexpected problem with this test in CI
444+
# Let's get an additional information about this test failure.
445+
#
446+
logging.error("Node was not stopped.")
447+
if not node.os_ops.path_exists(node.pg_log_file):
448+
logging.warning("Node log does not exist.")
449+
else:
450+
logging.info("Let's read node log file [{0}]".format(node.pg_log_file))
451+
logFileData = node.os_ops.read(node.pg_log_file, binary=False)
452+
logging.info("Node log file content:\n{0}".format(logFileData))
453+
441454
raise Exception("Could not stop node.")
442455

443456
nAttempt += 1

tests/test_simple_remote.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,19 @@ def test_pg_ctl_wait_option(self):
517517
nAttempt = 0
518518
while True:
519519
if nAttempt == C_MAX_ATTEMPTS:
520+
#
521+
# [2025-03-11]
522+
# We have an unexpected problem with this test in CI
523+
# Let's get an additional information about this test failure.
524+
#
525+
logging.error("Node was not stopped.")
526+
if not node.os_ops.path_exists(node.pg_log_file):
527+
logging.warning("Node log does not exist.")
528+
else:
529+
logging.info("Let's read node log file [{0}]".format(node.pg_log_file))
530+
logFileData = node.os_ops.read(node.pg_log_file, binary=False)
531+
logging.info("Node log file content:\n{0}".format(logFileData))
532+
520533
raise Exception("Could not stop node.")
521534

522535
nAttempt += 1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy