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

no-jira: set thread info for movie, hardened tab selection in selenium tests

parent 45aea76c
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@ import org.olat.core.commons.services.thumbnail.ThumbnailSPI;
import org.olat.core.commons.services.video.spi.FLVParser;
import org.olat.core.logging.OLog;
import org.olat.core.logging.Tracing;
import org.olat.core.util.WorkThreadInformations;
import org.olat.core.util.vfs.LocalFileImpl;
import org.olat.core.util.vfs.VFSLeaf;
import org.olat.ims.cp.ui.VFSCPNamedItem;
......@@ -115,6 +116,9 @@ public class MovieServiceImpl implements MovieService, ThumbnailSPI {
FinalSize size = null;
if(file instanceof LocalFileImpl && thumbnailFile instanceof LocalFileImpl) {
try {
WorkThreadInformations.setInfoFiles(null, file);
WorkThreadInformations.set("Generate thumbnail (video) VFSLeaf=" + file);
File baseFile = ((LocalFileImpl)file).getBasefile();
File scaledImage = ((LocalFileImpl)thumbnailFile).getBasefile();
BufferedImage frame = FrameGrab.getFrame(baseFile, 20);
......@@ -126,6 +130,8 @@ public class MovieServiceImpl implements MovieService, ThumbnailSPI {
//ArrayIndexOutOfBoundsException
} catch (Exception | AssertionError e) {
log.error("", e);
} finally {
WorkThreadInformations.unset();
}
}
return size;
......
......@@ -111,7 +111,6 @@ public class FolderIndexerWorker implements Callable<Boolean> {
if (docFactory.isFileSupported(leaf)) {
String myFilePath = fPath + "/" + leaf.getName();
leafResourceContext.setFilePath(myFilePath);
//fxdiff FXOLAT-97: high CPU load tracker
WorkThreadInformations.setInfoFiles(myFilePath, leaf);
WorkThreadInformations.set("Index VFSLeaf=" + myFilePath + " at " + leafResourceContext.getResourceUrl());
Document document = docFactory.createDocument(leafResourceContext, leaf);
......
......@@ -59,6 +59,7 @@ public class CourseEditorPageFragment {
public static final By changeNodeToolsMenu = By.cssSelector("ul.o_sel_course_editor_change_node");
public static final By changeNodeToolsMenuCaret = By.cssSelector("a.o_sel_course_editor_change_node");
public static final By tabNavTabsBy = By.cssSelector("ul.nav.nav-tabs");
public static final List<By> chooseRepoEntriesButtonList = new ArrayList<>();
static {
......@@ -155,6 +156,7 @@ public class CourseEditorPageFragment {
for(WebElement tabLink:tabLinks) {
tabLink.click();
OOGraphene.waitBusy(browser);
OOGraphene.waitElement(tabNavTabsBy, 5, browser);
List<WebElement> chooseRepoEntry = browser.findElements(tabBy);
if(chooseRepoEntry.size() > 0) {
found = true;
......
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