Testing kit: smaller gaps found testing retries and plain classes

Aperta
#684 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
laravel, php
Ambito
testing-qa

Direzione di ricerca

Start in packages/teme-testing, reading PluginUnderTest::runJob() and InteractsWithTeme::plugin(), and check how JobContext::attempt() gets its value. The issue leaves two choices open: whether runJob() takes an attempt number or replays retries, and whether the plugin's psr-4 mapping is registered at test boot or documented. Confirm the chosen approach with a maintainer first. Done means a test can run a job on attempt N and load a plugin class without calling plugin().

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/tests type/enhancement when/later

Two small gaps in the testing kit found while testing a plugin with retries.

  • runJob() always runs attempt 1. A job that behaves differently on its last try (for example, marking a share failed instead of letting Teme retry) can't be tested: JobContext::attempt() is always 1. Let runJob() take the attempt number, or run a job's retries as the queue would.
  • A plugin's classes load only after plugin() is called. A test of a plain class of the plugin before then fails with "class not found", so the package needs its own autoloader in tests/ for tests that don't enable the plugin. Register the plugin's psr-4 mapping when the test case boots, or document the pattern.

Where: packages/teme-testing, PluginUnderTest::runJob() and InteractsWithTeme::plugin().

🤖 Generated with Claude Code

Lingua principale
PHP
Stelle
1
Fork
1
Merge medio
1h 40m
PR unite (30g)
143

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di temecms/teme

Tutte le issue di temecms/teme

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.