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 Test Bigquery connector with CLI
""" """
import random import random
from datetime import datetime
from typing import List, Tuple from typing import List, Tuple
import pytest import pytest
@ -20,15 +21,15 @@ import pytest
from ingestion.tests.cli_e2e.base.e2e_types import E2EType from ingestion.tests.cli_e2e.base.e2e_types import E2EType
from metadata.data_quality.api.models import TestCaseDefinition from metadata.data_quality.api.models import TestCaseDefinition
from metadata.generated.schema.entity.data.table import ( from metadata.generated.schema.entity.data.table import (
ColumnProfile,
DmlOperationType, DmlOperationType,
ProfileSampleType, ProfileSampleType,
SystemProfile, SystemProfile,
Table,
TableProfilerConfig, TableProfilerConfig,
) )
from metadata.generated.schema.tests.basic import TestCaseResult, TestCaseStatus from metadata.generated.schema.tests.basic import TestCaseResult, TestCaseStatus
from metadata.generated.schema.tests.testCase import TestCaseParameterValue 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.test_cli_db import CliCommonDB
from .common_e2e_sqa_mixins import SQACommonMethods from .common_e2e_sqa_mixins import SQACommonMethods
@ -223,11 +224,14 @@ class BigqueryCliTest(CliCommonDB.TestSuite, SQACommonMethods):
self.run_command() self.run_command()
self.build_config_file(E2EType.PROFILER, {"includes": ["w_partition"]}) self.build_config_file(E2EType.PROFILER, {"includes": ["w_partition"]})
start_ts = int(datetime.now().timestamp() * 1000)
self.run_command("profile") self.run_command("profile")
table: Table = self.openmetadata.get_latest_table_profile( end_ts = int(datetime.now().timestamp() * 1000)
FullyQualifiedEntityName( column_profile = self.openmetadata.get_profile_data(
"local_bigquery.open-metadata-beta.w_partition.w_time_partition" "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 # 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": "max", "value": "600"},
{"name": "columnName", "value": "last_update"}, {"name": "columnName", "value": "last_update"},
{"name": "rangeType", "value": "YEAR"}, {"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() ).fetchall()
# Skip this test as for some reason it fails in CI @pytest.mark.skip("Skipping while investigating CI failure. Test passes locally.")
# FIXME: this needs investigation
@pytest.mark.skip("Skipping table diff test due to CI issues")
@pytest.mark.parametrize( @pytest.mark.parametrize(
"test_case_definition,expected_result", "test_case_definition,expected_result",
[ [