Selfie JVM Snapshot Garbage Collection is overly zealous when using multiple test suites in gradle
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- build-system, testing-qa
Direzione di ricerca
Inizia con il reproducer collegato e le relative istruzioni nel README, quindi segui la logica di garbage collection degli snapshot JUnit5 di Selfie per suite di test Gradle separate. Riproduci l’esecuzione di integrationTest e verifica che gli snapshot in src/test non vengano eliminati quando questi test sono assenti dal classpath di integrationTest. Il lavoro è completato quando gli snapshot dei test unitari non gestiti rimangono intatti, mentre gli snapshot obsoleti continuano a essere gestiti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In a project I was using a separate integrationTest source set with the JVM Test Suite approach recommended by Gradle link to instructions.
When done this way, the integration test sources will be in src/integrationTest instead of src/test. The classes in src/test will not be on the classpath of the integration tests.
When running Selfie with JUnit5, the current garbage collection logic is hardcoded to only look for *.ss files in src/test/ and performs a Class.forName(...) to see if that test still exists and has tests that match the snapshot. If it doesn't find a match, it deletes the file.
Since the unit tests are invisible on the integrationTest classpath, though, Class.forName(...) throws a ClassNotFoundException so selfie assumes this is a stale file and deletes. As a consequence, all the unit test snapshots are deleted when running the integrationTest task.
Is there some way to get the correct source root from Junit or something like that to avoid deleting unmanaged files?
A reproducer of the described issue can be found here with instructions in the README https://github.com/aelfric/selfie-bug-report-reproducer
- Lingua principale
- Kotlin
- Stelle
- 101
- Fork
- 18
- Merge medio
- 6g 11h
- PR unite (30g)
- 5
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di diffplug/selfie
-
enhancement jvm
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
bug jvm
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
bug docs jvm
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
-
bug jvm py
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
-
bug jvm
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
Tutte le issue di diffplug/selfie
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johanhaleby/occurrent#1120 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
2 rename bugs Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ankidroid/Anki-Android#21999 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
openwallet-foundation/multipaz#2028 ·