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