mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-e2e: print permissions of jave executable
parent
d02c109aa4
commit
17e1f79b8b
|
@ -132,7 +132,7 @@ public class OpenViduTestAppE2eTest {
|
|||
log.info("Using secret {} to connect to openvidu-server", OPENVIDU_SECRET);
|
||||
|
||||
try {
|
||||
log.info("Deleting folder /opt/openvidu/recordings");
|
||||
log.info("Cleaning folder /opt/openvidu/recordings");
|
||||
FileUtils.cleanDirectory(new File("/opt/openvidu/recordings"));
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
|
@ -940,7 +940,6 @@ public class OpenViduTestAppE2eTest {
|
|||
}
|
||||
|
||||
gracefullyLeaveParticipants(2);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -989,7 +988,6 @@ public class OpenViduTestAppE2eTest {
|
|||
user.getWaiter().until(ExpectedConditions.numberOfElementsToBe(By.cssSelector("#recorder-preview video"), 0));
|
||||
|
||||
gracefullyLeaveParticipants(1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1136,7 +1134,6 @@ public class OpenViduTestAppE2eTest {
|
|||
Thread.sleep(500);
|
||||
|
||||
gracefullyLeaveParticipants(1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1773,6 +1770,7 @@ public class OpenViduTestAppE2eTest {
|
|||
int framerate, String videoDecoder, String audioDecoder) {
|
||||
// Check tracks, duration, resolution, framerate and decoders
|
||||
MultimediaFileMetadata metadata = new MultimediaFileMetadata(file);
|
||||
metadata.processMultimediaFile();
|
||||
|
||||
if (hasVideo) {
|
||||
if (hasAudio) {
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
|
||||
package io.openvidu.test.e2e.utils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -33,12 +36,17 @@ public class MultimediaFileMetadata {
|
|||
|
||||
private static final Logger log = LoggerFactory.getLogger(MultimediaFileMetadata.class);
|
||||
|
||||
private File f;
|
||||
private MultimediaInfo mediaInfo;
|
||||
private AudioInfo audioInfo;
|
||||
private VideoInfo videoInfo;
|
||||
private VideoSize videoSize;
|
||||
|
||||
public MultimediaFileMetadata(File f) {
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
public void processMultimediaFile() {
|
||||
try {
|
||||
this.mediaInfo = new MultimediaObject(f).getInfo();
|
||||
this.audioInfo = mediaInfo.getAudio();
|
||||
|
@ -49,6 +57,8 @@ public class MultimediaFileMetadata {
|
|||
} catch (EncoderException e) {
|
||||
log.error("Error getting multimedia information from file {}. Error: {}", f.getAbsolutePath(),
|
||||
e.getMessage());
|
||||
log.info(System.getProperty("user.name"));
|
||||
this.executeCommand("ls -la /tmp/jave/");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,4 +130,21 @@ public class MultimediaFileMetadata {
|
|||
}
|
||||
}
|
||||
|
||||
private void executeCommand(String command) {
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
String s;
|
||||
Process p;
|
||||
p = Runtime.getRuntime().exec(command);
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
||||
while ((s = br.readLine()) != null)
|
||||
log.info("LINE: " + s);
|
||||
p.waitFor();
|
||||
System.out.println("EXIT VALUE: " + p.exitValue());
|
||||
p.destroy();
|
||||
} catch (IOException | InterruptedException e1) {
|
||||
log.info("Error updateing permissions of jave executable. Error: {}" + e1.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue