microsoft / microsoft/vscode-java-test
Maven forkCount and reuseForks apparently not respected
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 340
- Forks
- 173
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 18
Descripción
Hello,
I am using systemstubs library.
As its author said, because of the way the library works, tests using it must be running in a forked vm, one per test.
I have been able to make this work in maven.
I have a multi module pom.xml. In my specific module pom.xml I configured sure-fire as follows:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<forkCount>2.5C</forkCount>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
This makes tests run by maven in cli run correctly.
However, when I run tests in vs code, they behave exactly as like they did when maven had not been configured with 1 fork, not reusing forks.
it seems as if not only is vs code not forking vms, it is running even methods in paralel, because tests in the same class are conflicting, while they should run sequentially in one thread, one after the other, in a class exclusive jvm process as maven is doing.
This makes me believe that either
- vscode has its own runner and does not delegate to maven the test running OR
- Some how delegation is ignoring the specific configuration in the module's pom.xml.
I have been searching a way to let vscode test runner know tthat either it should fork jvm process and run one test in each vm or it should delegate and follow what is specified in pom.xml.
Another desired and may be faster solution is to find (something I haven't found either) a way of asking vscode to just ignore these tests when running tests, so that we stop having failures on the test result.
Can you please provide me with information on how to proceed?
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.
Línea de trabajo
Reproduzca el comportamiento con el pom.xml del módulo, la configuración de maven-surefire-plugin y el ejecutor de pruebas de VS Code, comparando la ejecución de Maven mediante la CLI con la ejecución mediante VS Code. Determine si el ejecutor de VS Code delega en Maven y cómo gestiona forkCount, reuseForks y las exclusiones de pruebas. Se considerará terminado cuando se haya establecido el comportamiento compatible o la limitación, y la configuración o solución alternativa solicitada esté claramente documentada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, vscode
- Área
- devtools, testing-qa
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100