fix infinite loop in test

This commit is contained in:
fjy 2014-07-15 16:00:56 -07:00
parent bdfeccd092
commit 27c4750780
1 changed files with 6 additions and 5 deletions

View File

@ -196,8 +196,9 @@ 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) {