File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
tmc-langs-util/src/task_executor Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -404,9 +404,12 @@ mod test {
404404 use super :: * ;
405405 use std:: fs;
406406 use std:: path:: PathBuf ;
407+ use std:: sync:: Once ;
407408 use tempfile:: TempDir ;
408409 use walkdir:: WalkDir ;
409410
411+ static LOG_ENV : Once = Once :: new ( ) ;
412+
410413 const MAVEN_CLONE : & str = "tests/data/MavenExercise" ;
411414 const MAVEN_ZIP : & str = "tests/data/MavenExercise.zip" ;
412415
@@ -417,9 +420,11 @@ mod test {
417420 const PYTHON_ZIP : & str = "tests/data/PythonExercise.zip" ;
418421
419422 fn init ( ) {
420- if std:: env:: var ( "RUST_LOG" ) . is_err ( ) {
421- std:: env:: set_var ( "RUST_LOG" , "debug,j4rs=warn" ) ;
422- }
423+ LOG_ENV . call_once ( || {
424+ if std:: env:: var ( "RUST_LOG" ) . is_err ( ) {
425+ std:: env:: set_var ( "RUST_LOG" , "debug,j4rs=warn" ) ;
426+ }
427+ } ) ;
423428 let _ = env_logger:: builder ( ) . is_test ( true ) . try_init ( ) ;
424429 }
425430
You can’t perform that action at this time.
0 commit comments