From 27c47507803729774b54977844d54495cfcb5b3b Mon Sep 17 00:00:00 2001 From: fjy Date: Tue, 15 Jul 2014 16:00:56 -0700 Subject: [PATCH] fix infinite loop in test --- .../server/shard/HashBasedNumberedShardSpecTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/server/src/test/java/io/druid/server/shard/HashBasedNumberedShardSpecTest.java b/server/src/test/java/io/druid/server/shard/HashBasedNumberedShardSpecTest.java index 5f176015c2a..2ab82655bf0 100644 --- a/server/src/test/java/io/druid/server/shard/HashBasedNumberedShardSpecTest.java +++ b/server/src/test/java/io/druid/server/shard/HashBasedNumberedShardSpecTest.java @@ -196,14 +196,15 @@ 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); } } - } + } } }