Skip to content

Test test_backup_restore_on_cluster/test.py::test_shutdown_waits_for_backup is flaky #84798

@nikitamikhaylov

Description

@nikitamikhaylov

Describe the bug

https://s3.amazonaws.com/clickhouse-test-reports/PRs/84082/cc0b417aaf67164309b24a780c7ebc249874814a//integration_tests_tsan_4_6/integration_run_parallel0_0.log

Error message and/or stacktrace

=================================== FAILURES ===================================
________________________ test_shutdown_waits_for_backup ________________________
[gw0] linux -- Python 3.10.12 /usr/bin/python3

    def test_shutdown_waits_for_backup():
        node1.query(
            "CREATE TABLE tbl ON CLUSTER 'cluster' ("
            "x UInt8"
            ") ENGINE=ReplicatedMergeTree('/clickhouse/tables/tbl/', '{replica}')"
            "ORDER BY x"
        )
    
        node1.query("INSERT INTO tbl VALUES (3)")
        node2.query("INSERT INTO tbl VALUES (5)")
    
        backup_name = new_backup_name()
    
        id = node1.query(
            f"BACKUP TABLE tbl ON CLUSTER 'cluster' TO {backup_name} ASYNC"
        ).split("\t")[0]
    
        # If kill=False the pending backup must be completed
        # If kill=True the pending backup might be completed or failed
        node2.restart_clickhouse(kill=False)
    
        assert_eq_with_retry(
            node1,
            f"SELECT status FROM system.backups WHERE id='{id}' AND status == 'CREATING_BACKUP'",
            "",
            retry_count=100,
        )
    
        status = node1.query(f"SELECT status FROM system.backups WHERE id='{id}'").strip()
>       assert status == "BACKUP_CREATED"
E       AssertionError: assert 'BACKUP_FAILED' == 'BACKUP_CREATED'
E         - BACKUP_CREATED
E         + BACKUP_FAILED

test_backup_restore_on_cluster/test.py:1196: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    flaky testflaky test found by CItestingSpecial issue with list of bugs found by CI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions