File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff 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" ):
You can’t perform that action at this time.
0 commit comments