Skip to content

Commit

Permalink
ref(test): Disable kotest classpath autoscan (#2164)
Browse files Browse the repository at this point in the history
This change reduces test execution time by about 1 min (30%) on my
machine.

Since the update to kotest 5.9 the following warning gets printed during
tests:
Warning: Kotest autoscan is enabled. This means Kotest will scan the classpath for extensions that are annotated with @AutoScan. To avoid this startup cost, disable autoscan by setting the system property 'kotest.framework.classpath.scanning.autoscan.disable=true'. In 6.0 this value will default to true. For further details see https://kotest.io/docs/next/framework/project-config.html#runtime-detection
  • Loading branch information
bgrozev authored Jun 4, 2024
1 parent e51f487 commit df722ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jitsi-media-transform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<kotest.framework.classpath.scanning.autoscan.disable>true</kotest.framework.classpath.scanning.autoscan.disable>
</systemPropertyVariables>
<excludes>
<!-- init() currently throws an exception -->
<exclude>DtlsStackTest.*</exclude>
Expand Down
1 change: 1 addition & 0 deletions jvb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@
<configuration>
<systemPropertyVariables>
<java.util.logging.config.file>${project.basedir}/lib/logging.properties</java.util.logging.config.file>
<kotest.framework.classpath.scanning.autoscan.disable>true</kotest.framework.classpath.scanning.autoscan.disable>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
5 changes: 5 additions & 0 deletions rtp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<kotest.framework.classpath.scanning.autoscan.disable>true</kotest.framework.classpath.scanning.autoscan.disable>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>com.github.gantsign.maven</groupId>
Expand Down

0 comments on commit df722ac

Please sign in to comment.