mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
fix code
This commit is contained in:
@@ -137,7 +137,8 @@ public class IdUtilTest {
|
||||
|
||||
@Test
|
||||
public void getDataCenterIdTest(){
|
||||
//按照mac地址算法拼接的算法,maxDatacenterId应该是0xffffffffL>>6-1此处暂时按照0x7fffffffffffffffL-1,防止最后取模溢出
|
||||
final long dataCenterId = IdUtil.getDataCenterId(Long.MAX_VALUE);
|
||||
Assert.assertTrue(dataCenterId > 1);
|
||||
Assert.assertTrue(dataCenterId >= 0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user