add getWorkerId stc

This commit is contained in:
Looly
2021-06-28 20:49:39 +08:00
parent 8e82919464
commit 16910ed709
7 changed files with 206 additions and 58 deletions

View File

@@ -134,4 +134,10 @@ public class IdUtilTest {
}
Assert.assertEquals(threadCount * idCountPerThread, set.size());
}
@Test
public void getDataCenterIdTest(){
final long dataCenterId = IdUtil.getDataCenterId(Long.MAX_VALUE);
Assert.assertTrue(dataCenterId > 1);
}
}