mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
wait for netty threads to finish in tests
This commit is contained in:
@@ -36,6 +36,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
@@ -115,7 +117,13 @@ public class CompilerTestUtil {
|
||||
ModuleRootModificationUtil.setModuleSdk(module, internalJdk);
|
||||
}
|
||||
BuildManager.getInstance().clearState(project);
|
||||
BuildManager.getInstance().stopListening();
|
||||
Future<?> future = BuildManager.getInstance().stopListening();
|
||||
try {
|
||||
future.get(100, TimeUnit.SECONDS);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user