Author: sannegrinovero
Date: 2010-01-08 15:58:19 -0500 (Fri, 08 Jan 2010)
New Revision: 18465
Modified:
search/trunk/src/test/java/org/hibernate/search/test/util/textbuilder/TextProductionTest.java
Log:
Fixed test TextProductionTest which would break depending on environment, and speedup for
HSEARCH-408
Modified:
search/trunk/src/test/java/org/hibernate/search/test/util/textbuilder/TextProductionTest.java
===================================================================
---
search/trunk/src/test/java/org/hibernate/search/test/util/textbuilder/TextProductionTest.java 2010-01-08
20:24:18 UTC (rev 18464)
+++
search/trunk/src/test/java/org/hibernate/search/test/util/textbuilder/TextProductionTest.java 2010-01-08
20:58:19 UTC (rev 18465)
@@ -40,8 +40,12 @@
public class TextProductionTest extends TestCase {
public void testSomeWordsGetBuilt() {
- SentenceInventor wi = new SentenceInventor( 7L, 10000 );
- assertEquals( "Qoswo, orrmi ag ybwp bbtb kw qgtqaon lyhk nbv: qrqm flyui hyshm
jmpqyb qmolml fjxw gnumocv Twwg.\n", wi.nextPeriod() );
+ SentenceInventor wi = new SentenceInventor( 7L, 200 );
+ String randomPeriod = wi.nextPeriod();
+ // randomPeriod will be some random sentence like "Qoswo, orrmi ag ybwp bbtb kw
qgtqaon lyhk nbv: qrqm flyui hyshm jmpqyb qmolml fjxw gnumocv Twwg."
+ // but exact string contents depends on environment
+ assertNotNull( randomPeriod );
+ assertTrue( randomPeriod.length() > 0 );
}
}
Show replies by date