Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
burak-58 committed Dec 23, 2024
1 parent afcabdc commit 57df156
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/test/java/io/antmedia/test/StreamFetcherUnitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,17 @@ public void testHLSSourceFmp4() {
//test HLS Source
String streamId = testFetchStreamSources("src/test/resources/test.m3u8", false, false, true, "fmp4");

File f = new File("webapps/junit/streams/"+streamId +"_init.mp4");
assertTrue(f.exists());
String[] filesInStreams = new File("webapps/junit/streams").list();
boolean initFileFound = false;
String regex = streamId + "_" + System.currentTimeMillis()/10000 + "\\d{4}_init.mp4";
System.out.println("regex:"+regex);

for (int i = 0; i < filesInStreams.length; i++) {
System.out.println("files:"+filesInStreams[i]);
initFileFound |= filesInStreams[i].matches(regex);
}
assertTrue(initFileFound);

logger.info("leaving testHLSSource");
}

Expand Down

0 comments on commit 57df156

Please sign in to comment.