Skip to content

perf(tests): trim playwright select2 delays + remove dead pbn_integrator stub#236

Merged
mpasternak merged 2 commits into
devfrom
perf/test-speedup-2
May 21, 2026
Merged

perf(tests): trim playwright select2 delays + remove dead pbn_integrator stub#236
mpasternak merged 2 commits into
devfrom
perf/test-speedup-2

Conversation

@mpasternak
Copy link
Copy Markdown
Member

Summary

  • Wycina sztywne opóźnienia w playwright_util.py: usuwa delay=50 z press_sequentially, zmniejsza dwa wait_for_timeout(50/100) do 0 (yield event loop tick zamiast realnego sleepa).
  • Kasuje martwy plik src/pbn_integrator/core/__init__.py — same time.sleep + fikcyjne returny, nic z tego nie było używane.

Test plan

  • make tests-without-playwright
  • testy Playwright używające select_select2_autocomplete (smoke z src/integration_tests/)
  • ruff check . && ruff format --check .

🤖 Generated with Claude Code

mpasternak and others added 2 commits May 4, 2026 09:58
- Remove delay=50 from press_sequentially() - no longer needed
- Change wait_for_timeout(50) to wait_for_timeout(0) - wait for next event loop tick instead
- Change wait_for_timeout(100) to wait_for_timeout(0) - wait for next event loop tick instead

These delays were historical band-aids that accumulated across multiple
Select2 interactions in Playwright tests. Modern event-driven waiting
strategies make them unnecessary. Zero-timer waits still allow the
JavaScript event loop to process pending microtasks, which is what
the original waits were trying to accomplish.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove 149 lines of stub functions with time.sleep() calls that are
shadowing working implementations in:
- pbn_integrator/importer/ (importuj_zrodla, importuj_publikacje_*)
- import_common/core/uczelnia.py (matchuj_uczelnie)

Nothing imports from this module - it's leftover placeholder code
from the initial pbn_integrator implementation that was never
cleaned up.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mpasternak mpasternak merged commit cb75553 into dev May 21, 2026
9 checks passed
@mpasternak mpasternak deleted the perf/test-speedup-2 branch May 21, 2026 08:05
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