mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
!792 【轻量级pr】优化 getProcessorCount 潜在的获取不到的问题 - V5
Merge pull request !792 from dazer007/v5-dev-cpunum-fix
This commit is contained in:
@@ -43,4 +43,11 @@ public class RuntimeUtilTest {
|
||||
int pid = RuntimeUtil.getPid();
|
||||
Assert.assertTrue(pid > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getProcessorCountTest(){
|
||||
int cpu = RuntimeUtil.getProcessorCount();
|
||||
Console.log("cpu个数:{}", cpu);
|
||||
Assert.assertTrue(cpu > 0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user