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