From 76ba6c1760a6dbd3b389aa450e14f5e867d12da1 Mon Sep 17 00:00:00 2001 From: Oren Leiman Date: Fri, 31 Jan 2025 19:35:28 -0800 Subject: [PATCH] dt/dl: schema_evolution_test improve assert messages Signed-off-by: Oren Leiman --- tests/rptest/tests/datalake/schema_evolution_test.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/rptest/tests/datalake/schema_evolution_test.py b/tests/rptest/tests/datalake/schema_evolution_test.py index 5def9560385a..0601ece7106b 100644 --- a/tests/rptest/tests/datalake/schema_evolution_test.py +++ b/tests/rptest/tests/datalake/schema_evolution_test.py @@ -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): @@ -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(