mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
fix possible duplicate keys
This commit is contained in:
@@ -57,6 +57,24 @@ import java.util.concurrent.TimeoutException;
|
||||
public class DefaultKeyGeneratorTest
|
||||
{
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testCreateRandom()
|
||||
{
|
||||
DefaultKeyGenerator gen = new DefaultKeyGenerator();
|
||||
|
||||
for (int i = 0; i < 10000; i++)
|
||||
{
|
||||
int r = gen.createRandom();
|
||||
|
||||
assertTrue(r >= 100);
|
||||
assertTrue(r <= 999);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user