jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1431149 - /incubator/jspwiki/trunk/tests/org/apache/wiki/search/SearchManagerTest.java
Date Wed, 09 Jan 2013 23:33:04 GMT
Author: juanpablo
Date: Wed Jan  9 23:33:04 2013
New Revision: 1431149

URL: http://svn.apache.org/viewvc?rev=1431149&view=rev
Log:
further test refactoring; overall tests execution time is reduced by ~20%

Modified:
    incubator/jspwiki/trunk/tests/org/apache/wiki/search/SearchManagerTest.java

Modified: incubator/jspwiki/trunk/tests/org/apache/wiki/search/SearchManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/org/apache/wiki/search/SearchManagerTest.java?rev=1431149&r1=1431148&r2=1431149&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/org/apache/wiki/search/SearchManagerTest.java (original)
+++ incubator/jspwiki/trunk/tests/org/apache/wiki/search/SearchManagerTest.java Wed Jan  9
23:33:04 2013
@@ -136,11 +136,9 @@ public class SearchManagerTest extends T
         m_engine.saveText( ctx, "The Babylon Project was a dream given form. Its goal: to
prevent another war by creating a place where humans and aliens could work out their differences
peacefully." );
      
         Thread.yield();
+        Collection res = waitForIndex( "Babylon" ); // wait until 2nd m_engine.saveText()
takes effect
 
-        Thread.sleep( SLEEP_TIME * 50L ); // Should cover for both index and initial delay
-                                          // waitForIndex cannot be used here b/c it doesn't
detect
-                                          // the second call to saveText
-        Collection res = m_mgr.findPages( "mankind" );
+        res = m_mgr.findPages( "mankind" ); // check for text present in 1st m_engine.saveText()
but not in 2nd
 
         assertNotNull( "found results", res );
         assertEquals( "empty results", 0, res.size() );



Mime
View raw message