Selfie JVM Snapshot Garbage Collection is overly zealous when using multiple test suites in gradle
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Área
- build-system, testing-qa
Línea de trabajo
Comienza con el reproductor enlazado y sus instrucciones del README; después, sigue la lógica de recolección de basura de snapshots de JUnit5 de Selfie para suites de pruebas de Gradle independientes. Reproduce la ejecución de integrationTest y verifica que los snapshots bajo src/test no se eliminen cuando esas pruebas no estén presentes en el classpath de integrationTest. Se considera terminado cuando los snapshots de pruebas unitarias no gestionados permanecen intactos y los snapshots obsoletos siguen gestionándose.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Kotlin
- Estrellas
- 101
- Forks
- 18
- Merge medio
- 6 d 11 h
- PR fusionados (30 d)
- 5
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de diffplug/selfie
-
enhancement jvm
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
bug jvm
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
bug docs jvm
Dificultad 2/5 1-3 horas Aptitud para principiantes 50/100
-
bug jvm py
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
-
bug jvm
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
Todos los issues de diffplug/selfie
Issues similares
-
autoteam community team/use
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
android: AlbumArtistDetailViewModel keeps groupKeys of albums that disappeared in expandedAlbums Abiertotask
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
aaif-goose/goose#12496 ·
-
Schema rejections are neither logged nor attributed, so the offending object cannot be identified Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
zotero/zotero-android#350 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Richie97/track-history#325 ·