File tree Expand file tree Collapse file tree
microsphere-java-core/src/test/java/io/microsphere/io Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434import static java .util .concurrent .Executors .newFixedThreadPool ;
3535import static java .util .concurrent .Executors .newSingleThreadExecutor ;
3636import static java .util .concurrent .TimeUnit .MILLISECONDS ;
37+ import static java .util .concurrent .TimeUnit .SECONDS ;
3738import static org .junit .jupiter .api .Assertions .assertEquals ;
3839import static org .junit .jupiter .api .Assertions .assertFalse ;
3940import static org .junit .jupiter .api .Assertions .assertNotNull ;
@@ -116,8 +117,7 @@ void testDeleteDirectoryOnIOException() throws Exception {
116117 ExecutorService executor = newSingleThreadExecutor ();
117118 executor .submit (this ::testDeleteDirectoryOnIOException0 );
118119 shutdown (executor );
119- while (!executor .isTerminated ()) {
120- }
120+ assertTrue (executor .awaitTermination (5 , SECONDS ));
121121 }
122122
123123 Void testDeleteDirectoryOnIOException0 () throws Exception {
You can’t perform that action at this time.
0 commit comments