File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -249,12 +249,22 @@ impl JavaPlugin for MavenPlugin {
249249mod test {
250250 use super :: super :: { TestCase , TestCaseStatus } ;
251251 use super :: * ;
252+ use std:: sync:: Once ;
252253 use tempfile:: { tempdir, TempDir } ;
253254 use tmc_langs_framework:: plugin:: Strategy ;
254255 use walkdir:: WalkDir ;
255256
257+ static INIT_MAVEN : Once = Once :: new ( ) ;
258+
256259 fn init ( ) {
257260 let _ = env_logger:: builder ( ) . is_test ( true ) . try_init ( ) ;
261+
262+ // initializes maven in a synchronized manner for all tests
263+ #[ cfg( windows) ]
264+ INIT_MAVEN . call_once ( || {
265+ let mvn = MavenPlugin :: new ( ) . expect ( "failed to init maven" ) ;
266+ mvn. get_mvn_command ( ) . expect ( "failed to get mvn command" ) ;
267+ } ) ;
258268 }
259269
260270 fn copy_test_dir ( path : & str ) -> TempDir {
You can’t perform that action at this time.
0 commit comments