Skip to content

PBM-1460: Connection error isn't written to PBM log despite log-path option is specified #626

PBM-1460: Connection error isn't written to PBM log despite log-path option is specified

PBM-1460: Connection error isn't written to PBM log despite log-path option is specified #626

GitHub Actions / JUnit Test Report failed Dec 9, 2024 in 0s

42 tests run, 33 passed, 8 skipped, 1 failed.

Annotations

Check failure on line 178 in psmdb-testing/pbm-functional/pytest/test_rename_replicaset.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_rename_replicaset.test_logical_pitr_ddl_PBM_T273

AssertionError: assert 'old_index' not in {'_id_': {'key': [('_id', 1)], 'v': 2}, 'new_index': {'key': [('data', 1)], 'v': 2}, 'old_index': {'key': [('key', 1)], 'v': 2}}
 +  where {'_id_': {'key': [('_id', 1)], 'v': 2}, 'new_index': {'key': [('data', 1)], 'v': 2}, 'old_index': {'key': [('key', 1)], 'v': 2}} = index_information()
 +    where index_information = Collection(Database(MongoClient(host=['rs101:27017'], document_class=dict, tz_aware=False, connect=True), 'restored'), 'indexes').index_information
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe7cba4de10>

    @pytest.mark.timeout(300,func_only=True)
    def test_logical_pitr_ddl_PBM_T273(start_cluster,cluster):
        cluster.check_pbm_status()
        cluster.make_backup("logical")
        cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.1")
        time.sleep(5)
        client = pymongo.MongoClient(cluster.connection)
        client.drop_database('test')
        for i in range(10):
            client["test"]["indexes"].insert_one({"key": i+10, "data": i+10})
        client["test"]["indexes"].create_index("data",name="new_index")
        time.sleep(5)
        pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
        pitr=" --time=" + pitr
        Cluster.log("Time for PITR is: " + pitr)
        time.sleep(10)
        cluster.disable_pitr()
        time.sleep(5)
        backup=pitr + " --ns-from=test.indexes --ns-to=restored.indexes"
        cluster.make_restore(backup)
        client = pymongo.MongoClient(cluster.connection)
        assert client["restored"]["indexes"].count_documents({})==10
        for i in range(10):
            assert client["restored"]["indexes"].find_one({"key": i+10, "data": i+10})
        assert 'new_index' in client["restored"]["indexes"].index_information()
>       assert 'old_index' not in client["restored"]["indexes"].index_information()
E       AssertionError: assert 'old_index' not in {'_id_': {'key': [('_id', 1)], 'v': 2}, 'new_index': {'key': [('data', 1)], 'v': 2}, 'old_index': {'key': [('key', 1)], 'v': 2}}
E        +  where {'_id_': {'key': [('_id', 1)], 'v': 2}, 'new_index': {'key': [('data', 1)], 'v': 2}, 'old_index': {'key': [('key', 1)], 'v': 2}} = index_information()
E        +    where index_information = Collection(Database(MongoClient(host=['rs101:27017'], document_class=dict, tz_aware=False, connect=True), 'restored'), 'indexes').index_information

test_rename_replicaset.py:178: AssertionError