Skip to content

Commit b47d0e3

Browse files
committed
Debug: investigate CI-only test failure in memory catalog
Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
1 parent 555670c commit b47d0e3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/table/test_commit_retry.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
from typing import Any
1718
from unittest.mock import patch
1819

1920
import pytest
@@ -227,14 +228,16 @@ def counting_rebuild(self_tx: Transaction) -> None:
227228
original_do_commit = type(tbl2)._do_commit
228229
commit_count = 0
229230

230-
def counting_do_commit(self, updates, requirements):
231+
def counting_do_commit(self: Any, updates: Any, requirements: Any) -> None:
231232
nonlocal commit_count
232233
commit_count += 1
233234
print(f"DEBUG _do_commit called, count={commit_count}")
234235
return original_do_commit(self, updates, requirements)
235236

236-
with patch.object(Transaction, "_rebuild_snapshot_updates", counting_rebuild), \
237-
patch.object(type(tbl2), "_do_commit", counting_do_commit):
237+
with (
238+
patch.object(Transaction, "_rebuild_snapshot_updates", counting_rebuild),
239+
patch.object(type(tbl2), "_do_commit", counting_do_commit),
240+
):
238241
tbl2.append(df)
239242

240243
print(f"DEBUG rebuild_count={rebuild_count} commit_count={commit_count}")

0 commit comments

Comments
 (0)