Skip to content
Snippets Groups Projects
Commit 563aa03d authored by pkupczyk's avatar pkupczyk
Browse files

Add more verbose logging to TestInitializer to find why some of the tests that...

Add more verbose logging to TestInitializer to find why some of the tests that run on Hudson fail with a missing index file errors (locally they run fine).

SVN: 35647
parent e5f7baf7
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,10 @@ public class TestInitializer ...@@ -115,6 +115,10 @@ public class TestInitializer
System.setProperty("script-folder", scriptFolder); System.setProperty("script-folder", scriptFolder);
IndexCreationUtil.main(databaseKind, temporaryFile.getAbsolutePath(), String.valueOf(getCreateDBFromScratch())); IndexCreationUtil.main(databaseKind, temporaryFile.getAbsolutePath(), String.valueOf(getCreateDBFromScratch()));
operationLog.info("Created Lucene index in '" + temporaryFile.getAbsolutePath() + "'. The index is based on data from '"
+ scriptFolder + "' script folder.");
} catch (Exception ex) } catch (Exception ex)
{ {
operationLog.error("Couldn't create Lucene index", ex); operationLog.error("Couldn't create Lucene index", ex);
...@@ -166,6 +170,9 @@ public class TestInitializer ...@@ -166,6 +170,9 @@ public class TestInitializer
{ {
File targetPath = new File(TestInitializer.LUCENE_INDEX_PATH).getAbsoluteFile(); File targetPath = new File(TestInitializer.LUCENE_INDEX_PATH).getAbsoluteFile();
FileUtilities.deleteRecursively(targetPath); FileUtilities.deleteRecursively(targetPath);
operationLog.info("Removed Lucene index from '" + targetPath + "'.");
targetPath.mkdirs(); targetPath.mkdirs();
File srcPath = new File(LUCENE_INDEX_TEMPLATE_PATH).getAbsoluteFile(); File srcPath = new File(LUCENE_INDEX_TEMPLATE_PATH).getAbsoluteFile();
try try
...@@ -180,8 +187,12 @@ public class TestInitializer ...@@ -180,8 +187,12 @@ public class TestInitializer
}); });
new File(srcPath, FullTextIndexerRunnable.FULL_TEXT_INDEX_MARKER_FILENAME) new File(srcPath, FullTextIndexerRunnable.FULL_TEXT_INDEX_MARKER_FILENAME)
.createNewFile(); .createNewFile();
operationLog.info("Copied Lucene index from '" + srcPath + "' to '" + targetPath + "'.");
} catch (IOException ex) } catch (IOException ex)
{ {
operationLog.error("Could not copy Lucene index from '" + srcPath + "' to '" + targetPath + "'.", ex);
throw new IOExceptionUnchecked(ex); throw new IOExceptionUnchecked(ex);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment