Skip to content

Commit

Permalink
dt/dl: schema_evolution_test improve assert messages
Browse files Browse the repository at this point in the history
Signed-off-by: Oren Leiman <[email protected]>
  • Loading branch information
oleiman committed Feb 1, 2025
1 parent ef03f44 commit 76ba6c1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/rptest/tests/datalake/schema_evolution_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ def check_table_schema(
elif query_engine == QueryEngineType.TRINO:
table = [(t[0], t[1]) for t in table[1:]]

assert table == self.table(query_engine), \
str(table)
expect_table = self.table(query_engine)
assert table == expect_table, \
f"Expected table description {expect_table}, got {str(table)}"


class EvolutionTestCase(NamedTuple):
Expand Down Expand Up @@ -633,8 +634,10 @@ def test_dropped_column_no_collision(self, cloud_storage_type,
assert len(select_out) == count*3, \
f"Expected {count*3} rows, got {select_out}"

assert all(r[1] is None for r in select_out[:count * 2])
assert all(r[1] is not None for r in select_out[count * 2:])
assert all(r[1] is None for r in select_out[:count * 2]), \
f"Expected nulls for reintroduced {dropped_field_names} in first {count*2} rows, got {select_out[:count * 2]}"
assert all(r[1] is not None for r in select_out[count * 2:]), \
f"Expected non-nulls for {dropped_field_names} in last {count} rows, got {select_out[count * 2:]}"

@cluster(num_nodes=3)
@matrix(
Expand Down

0 comments on commit 76ba6c1

Please sign in to comment.