mirror of https://github.com/apache/druid.git
fix infinite loop in test
This commit is contained in:
parent
bdfeccd092
commit
27c4750780
|
@ -196,14 +196,15 @@ public class HashBasedNumberedShardSpecTest
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testValidity(){
|
public void testValidity()
|
||||||
for(int i=Integer.MIN_VALUE;i<=Integer.MAX_VALUE;i++){
|
{
|
||||||
|
for (int i = Integer.MIN_VALUE; i < Integer.MAX_VALUE; i++) {
|
||||||
{
|
{
|
||||||
int partitionNum = Math.abs((int) ((long) i % 2));
|
int partitionNum = Math.abs((int) ((long) i % 2));
|
||||||
if(partitionNum != 0 && partitionNum != 1){
|
if (partitionNum != 0 && partitionNum != 1) {
|
||||||
throw new ISE("for i "+ i+ "partitionNum "+ partitionNum);
|
throw new ISE("for i " + i + "partitionNum " + partitionNum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue