On Mar 23, 2009, at 6:52 AM, asiri (SVN) wrote:
Author: asiri
Date: 2009-03-23 06:52:52 +0100 (Mon, 23 Mar 2009)
New Revision: 17898
Modified:
platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
officeimporter/internal/OfficeImporterFileStorageTest.java
Log:
XWIKI-3406: Office Importer not working under windows environments
* Forgot to cleanup the temporary storage.
Modified: platform/core/trunk/xwiki-officeimporter/src/test/java/org/
xwiki/officeimporter/internal/OfficeImporterFileStorageTest.java
===================================================================
--- platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
officeimporter/internal/OfficeImporterFileStorageTest.java
2009-03-23 05:50:34 UTC (rev 17897)
+++ platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
officeimporter/internal/OfficeImporterFileStorageTest.java
2009-03-23 05:52:52 UTC (rev 17898)
@@ -45,5 +45,6 @@
{
OfficeImporterFileStorage storage = new
OfficeImporterFileStorage("Temp/\\:*?\"<>|Dir");
assertEquals("Temp---------Dir",
storage.getTempDir().getName());
+ storage.cleanUp();
There's no guarantee that this will be called. Imagine if there's an
exception for example. You should do cleaning in tearDown().
Shouldn't it be the code under test that should do the cleaning in
this case?
Thanks
-Vincent