MINOR: Py failing test cases (#21437)

* fix: failing test cases

* fix: skip test for now
This commit is contained in:
Teddy 2025-05-28 17:52:32 +02:00 committed by GitHub
parent 5c9ba21bbc
commit 2a120c166a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 12 deletions

View File

@ -13,6 +13,7 @@
Test Bigquery connector with CLI
"""
import random
from datetime import datetime
from typing import List, Tuple
import pytest
@ -20,15 +21,15 @@ import pytest
from ingestion.tests.cli_e2e.base.e2e_types import E2EType
from metadata.data_quality.api.models import TestCaseDefinition
from metadata.generated.schema.entity.data.table import (
ColumnProfile,
DmlOperationType,
ProfileSampleType,
SystemProfile,
Table,
TableProfilerConfig,
)
from metadata.generated.schema.tests.basic import TestCaseResult, TestCaseStatus
from metadata.generated.schema.tests.testCase import TestCaseParameterValue
from metadata.generated.schema.type.basic import FullyQualifiedEntityName, Timestamp
from metadata.generated.schema.type.basic import Timestamp
from .common.test_cli_db import CliCommonDB
from .common_e2e_sqa_mixins import SQACommonMethods
@ -223,11 +224,14 @@ class BigqueryCliTest(CliCommonDB.TestSuite, SQACommonMethods):
self.run_command()
self.build_config_file(E2EType.PROFILER, {"includes": ["w_partition"]})
start_ts = int(datetime.now().timestamp() * 1000)
self.run_command("profile")
table: Table = self.openmetadata.get_latest_table_profile(
FullyQualifiedEntityName(
"local_bigquery.open-metadata-beta.w_partition.w_time_partition"
)
)
end_ts = int(datetime.now().timestamp() * 1000)
column_profile = self.openmetadata.get_profile_data(
"local_bigquery.open-metadata-beta.w_partition.w_time_partition.id",
start_ts,
end_ts,
profile_type=ColumnProfile,
).entities[0]
# We ingest 1 row for each day and the profiler should default to the latest partition
assert table.profile.rowCount == 1
assert column_profile.valuesCount == 1

View File

@ -198,7 +198,7 @@ def run_data_quality_workflow(
{"name": "max", "value": "600"},
{"name": "columnName", "value": "last_update"},
{"name": "rangeType", "value": "YEAR"},
{"name": "rangeInterval", "value": "12"},
{"name": "rangeInterval", "value": "50"},
],
},
],

View File

@ -47,9 +47,7 @@ def prepare_data(create_test_data, trino_container):
).fetchall()
# Skip this test as for some reason it fails in CI
# FIXME: this needs investigation
@pytest.mark.skip("Skipping table diff test due to CI issues")
@pytest.mark.skip("Skipping while investigating CI failure. Test passes locally.")
@pytest.mark.parametrize(
"test_case_definition,expected_result",
[