8000 PostgresNode::start is updated [no logging.error] · postgrespro/testgres@b917141 · GitHub
[go: up one dir, main page]

Skip to content
  • Commit b917141

    Browse files
    PostgresNode::start is updated [no logging.error]
    It does not uses logging.error when it can't reallocate port number. It throws exception only. Why? Our new test infrastructure will process logging.error and will increment an error counter. As result - some tests start failing.
    1 parent 2090fbc commit b917141

    File tree

    2 files changed

    +2
    -3
    lines changed

    2 files changed

    +2
    -3
    lines changed

    testgres/node.py

    Lines changed: 1 addition & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1038,8 +1038,7 @@ def LOCAL__raise_cannot_start_node__std(from_exception):
    10381038
    assert nAttempt > 0
    10391039
    assert nAttempt <= __class__._C_MAX_START_ATEMPTS
    10401040
    if nAttempt == __class__._C_MAX_START_ATEMPTS:
    1041-
    logging.error("Reached maximum retry attempts. Unable to start node.")
    1042-
    LOCAL__raise_cannot_start_node(e, "Cannot start node after multiple attempts")
    1041+
    LOCAL__raise_cannot_start_node(e, "Cannot start node after multiple attempts.")
    10431042

    10441043
    log_files1 = self._collect_log_files()
    10451044
    if not self._detect_port_conflict(log_files0, log_files1):

    tests/test_simple.py

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -450,7 +450,7 @@ def test_port_conflict(self):
    450450

    451451
    with pytest.raises(
    452452
    expected_exception=StartNodeException,
    453-
    match=re.escape("Cannot start node after multiple attempts")
    453+
    match=re.escape("Cannot start node after multiple attempts.")
    454454
    ):
    455455
    node2.init().start()
    456456

    0 commit comments

    Comments
     (0)
    0