microsoft / microsoft/vscode-java-test
Maven forkCount and reuseForks apparently not respected
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 340
- Forks
- 173
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 18
Beschreibung
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?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduzieren Sie das Verhalten mit dem Modul pom.xml, den Einstellungen des maven-surefire-plugin und dem VS Code test runner, und vergleichen Sie die Maven-Ausführung über die CLI mit der Ausführung über VS Code. Verfolgen Sie, ob der VS Code runner an Maven delegiert und wie er forkCount, reuseForks und Testausschlüsse behandelt. Als abgeschlossen gilt, wenn das unterstützte Verhalten oder die Einschränkung festgestellt und die angeforderte Konfiguration oder der Workaround eindeutig dokumentiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, vscode
- Bereich
- devtools, testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100