Skip to content
Snippets Groups Projects
Commit d545f6dd authored by srosse's avatar srosse
Browse files

FXOLAT-207: update PortfolioModuleTest to wait until the event is send, make...

FXOLAT-207: update PortfolioModuleTest to wait until the event is send, make the LogFileParser works on test unit
parent 16185721
No related branches found
No related tags found
No related merge requests found
...@@ -60,8 +60,8 @@ public class LogFileParser extends LogDelegator { ...@@ -60,8 +60,8 @@ public class LogFileParser extends LogDelegator {
} else { } else {
logfilepathBase = logdir + File.separator + filename; logfilepathBase = logdir + File.separator + filename;
} }
}else { } else {
//todo if java.io.tmpdir is in use the log gets written to catalina.out.... logfilepathBase = System.getProperty("java.io.tmpdir") + File.separator + "logs" + File.separator + filename;
} }
log = getLogger(); log = getLogger();
} }
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
package org.olat.portfolio; package org.olat.portfolio;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
import java.util.List; import java.util.List;
...@@ -113,6 +113,12 @@ public class PortfolioModuleTest extends OlatTestCase { ...@@ -113,6 +113,12 @@ public class PortfolioModuleTest extends OlatTestCase {
////////////////////////////////// //////////////////////////////////
portfolioModule.setEnableArtefactHandler(dummyHandler, false); portfolioModule.setEnableArtefactHandler(dummyHandler, false);
try {//wait until the event is send
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
//found in the list of all available handlers //found in the list of all available handlers
List<EPArtefactHandler<?>> allHandlers = portfolioModule.getAllAvailableArtefactHandlers(); List<EPArtefactHandler<?>> allHandlers = portfolioModule.getAllAvailableArtefactHandlers();
boolean foundInAll = false; boolean foundInAll = false;
...@@ -144,6 +150,12 @@ public class PortfolioModuleTest extends OlatTestCase { ...@@ -144,6 +150,12 @@ public class PortfolioModuleTest extends OlatTestCase {
////////////////////////////////// //////////////////////////////////
portfolioModule.setEnableArtefactHandler(dummyHandler, false); portfolioModule.setEnableArtefactHandler(dummyHandler, false);
try {//wait until the event is send
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
//found in the list of all available handlers //found in the list of all available handlers
allHandlers = portfolioModule.getAllAvailableArtefactHandlers(); allHandlers = portfolioModule.getAllAvailableArtefactHandlers();
foundInAll = false; foundInAll = false;
......
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