Author: ggregory Date: Sun Aug 7 02:46:53 2011 New Revision: 1154639 URL: http://svn.apache.org/viewvc?rev=1154639&view=rev Log: Set test length to 40. Runs between 1.1 and 13 seconds at length 40 for me.
Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java?rev=1154639&r1=1154638&r2=1154639&view=diff ============================================================================== --- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java (original) +++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java Sun Aug 7 02:46:53 2011 @@ -162,6 +162,11 @@ public class BeiderMorseEncoderTest exte bmpm.setRuleType(RuleType.RULES); } + /** + * Runs between 1.1 and 13 seconds at length 40 for me (Gary Gregory, 2011/08/06) + * + * @throws EncoderException + */ @Test(/* timeout = 20000L */) public void testSpeedCheck() throws EncoderException { char[] chars = new char[] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'o', 'u' }; @@ -170,7 +175,7 @@ public class BeiderMorseEncoderTest exte Random rand = new Random(); stringBuffer.append(chars[rand.nextInt(chars.length)]); long start; - for (int i = 0; i < 30; i++) { + for (int i = 0; i < 40; i++) { start = System.currentTimeMillis(); // System.out.println(i + " String to encode:" + stringBuffer.toString()); bmpm.encode(stringBuffer.toString());