openvidu-server-e2e: recursive jave executable

pull/203/head
pabloFuente 2019-01-28 11:09:30 +01:00
parent e741505100
commit 66f0752b5f
2 changed files with 13 additions and 3 deletions

View File

@ -1770,7 +1770,7 @@ public class OpenViduTestAppE2eTest {
int framerate, String videoDecoder, String audioDecoder) { int framerate, String videoDecoder, String audioDecoder) {
// Check tracks, duration, resolution, framerate and decoders // Check tracks, duration, resolution, framerate and decoders
MultimediaFileMetadata metadata = new MultimediaFileMetadata(file); MultimediaFileMetadata metadata = new MultimediaFileMetadata(file);
metadata.processMultimediaFile(); metadata.processMultimediaFile(0);
if (hasVideo) { if (hasVideo) {
if (hasAudio) { if (hasAudio) {

View File

@ -46,7 +46,7 @@ public class MultimediaFileMetadata {
this.f = f; this.f = f;
} }
public void processMultimediaFile() { public void processMultimediaFile(int iteration) {
try { try {
this.mediaInfo = new MultimediaObject(f).getInfo(); this.mediaInfo = new MultimediaObject(f).getInfo();
this.audioInfo = mediaInfo.getAudio(); this.audioInfo = mediaInfo.getAudio();
@ -57,8 +57,19 @@ public class MultimediaFileMetadata {
} catch (EncoderException e) { } catch (EncoderException e) {
log.error("Error getting multimedia information from file {}. Error: {}", f.getAbsolutePath(), log.error("Error getting multimedia information from file {}. Error: {}", f.getAbsolutePath(),
e.getMessage()); e.getMessage());
try {
Thread.sleep(1000);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
log.info(System.getProperty("user.name")); log.info(System.getProperty("user.name"));
this.executeCommand("ls -la /tmp/jave/"); this.executeCommand("ls -la /tmp/jave/");
if (iteration < 5) {
this.processMultimediaFile(iteration++);
} else {
log.error("Couldn't run jave 5 iterations");
return;
}
} }
} }
@ -132,7 +143,6 @@ public class MultimediaFileMetadata {
private void executeCommand(String command) { private void executeCommand(String command) {
try { try {
Thread.sleep(500);
String s; String s;
Process p; Process p;
p = Runtime.getRuntime().exec(command); p = Runtime.getRuntime().exec(command);