Skip to content

Commit 839e774

Browse files
committed
PR changes
1 parent 44396f2 commit 839e774

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/integration/test_catalog.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,10 @@ def test_update_table_schema_conflict(
376376
# update the schema concurrently so that the original update fails
377377
concurrent_table = test_catalog.load_table(identifier)
378378
# The test schema is assumed to have a `bar` column that can be deleted.
379-
concurrent_update = concurrent_table.update_schema(allow_incompatible_changes=True)
380-
concurrent_update.set_identifier_fields("foo")
381-
concurrent_update.update_column("foo", required=True)
382-
concurrent_update.delete_column("bar")
383-
concurrent_update.commit()
379+
with concurrent_table.update_schema(allow_incompatible_changes=True) as concurrent_update:
380+
concurrent_update.set_identifier_fields("foo")
381+
concurrent_update.update_column("foo", required=True)
382+
concurrent_update.delete_column("bar")
384383

385384
# attempt to commit the original update
386385
with pytest.raises(CommitFailedException, match="Requirement failed: current schema"):

0 commit comments

Comments
 (0)