Skip to content

fix: properly reset mock in test_hive_wait_for_lock#3047

Open
sumedhsakdeo wants to merge 1 commit intoapache:mainfrom
sumedhsakdeo:fix/hive-wait-for-lock-test
Open

fix: properly reset mock in test_hive_wait_for_lock#3047
sumedhsakdeo wants to merge 1 commit intoapache:mainfrom
sumedhsakdeo:fix/hive-wait-for-lock-test

Conversation

@sumedhsakdeo
Copy link

@sumedhsakdeo sumedhsakdeo commented Feb 15, 2026

Summary

  • Fix flaky test_hive_wait_for_lock test by using reset_mock() instead of manually setting call_count = 0
  • Setting mock.call_count = 0 does not reset the mock's internal call tracking, causing the second assertion to see accumulated calls from both test phases (expected 5, got 8)

Test plan

  • Verify test_hive_wait_for_lock passes consistently across all Python versions in CI

Setting `mock.call_count = 0` does not actually reset the mock's
internal call tracking, causing the second assertion to see accumulated
calls from both test phases. Use `reset_mock()` instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant