Possible fix to QueryTest failure

- Temporarily disable FTS indexing during tests as it may run concurrently with a lag and skew results

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31920 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-11-14 09:56:10 +00:00
parent 9e0b92d81e
commit 60688d34b9
2 changed files with 17 additions and 0 deletions

View File

@@ -241,6 +241,9 @@ public class QueryTest extends BaseCMISTest
{
super.setUp();
// If FTS kicks in at the wrong moment, it can skew the test results. Temporarily disable it during the test
this.luceneFTS.pause();
DataTypeDefinition dataType = dictionaryService.getDataType(DataTypeDefinition.DATETIME);
String analyserClassName = dataType.resolveAnalyserClassName();
usesDateTimeAnalyser = analyserClassName.equals(DateTimeAnalyser.class.getCanonicalName());
@@ -493,6 +496,15 @@ public class QueryTest extends BaseCMISTest
doc_count++;
nodeService.setProperty(c10, ContentModel.PROP_VERSION_LABEL, "label");
}
@Override
protected void tearDown() throws Exception
{
super.tearDown();
this.luceneFTS.resume();
}
private <T> T testQuery(String query, int size, boolean dump, String returnPropertyName, T returnType, boolean shouldThrow) throws Exception
{