jvlc: various unit tests fixes
authorFilippo Carone <littlejohn@videolan.org>
Sun, 14 Dec 2008 21:23:06 +0000 (22:23 +0100)
committerFilippo Carone <littlejohn@videolan.org>
Sun, 14 Dec 2008 21:26:04 +0000 (22:26 +0100)
bindings/java/core/src/test/java/org/videolan/jvlc/AbstractJVLCTest.java
bindings/java/core/src/test/java/org/videolan/jvlc/internal/AbstractVLCInternalTest.java
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java

index 86d6b27..077fe9c 100644 (file)
@@ -47,7 +47,7 @@ public abstract class AbstractJVLCTest
 
     protected String mrl;
 
-    private String address = "http://streams.videolan.org/streams-videolan/reference/mp4/bl.mp4";
+    private String address = "http://streams.videolan.org/streams-videolan/avi/Hero-Div3.avi";
 
     /**
      * Logger.
index efdcbcb..defc8da 100644 (file)
@@ -54,7 +54,7 @@ public abstract class AbstractVLCInternalTest
 
     protected libvlc_exception_t exception;
 
-    private String address = "http://streams.videolan.org/streams-videolan/reference/avi/Hero-Div3.avi";
+    private String address = "http://streams.videolan.org/streams-videolan/avi/Hero-Div3.avi";
 
     /**
      * Logger.
@@ -123,6 +123,10 @@ public abstract class AbstractVLCInternalTest
                 out.write(buffer, 0, numRead);
                 numWritten += numRead;
             }
+            if (numWritten == 0)
+            {
+                throw new RuntimeException("Cannot download sample, please check the url or your internet connection.");
+            }
             log.info("Sample downloaded.");
             mrl = testResoucesPath + ".avi";
         }
index 994282f..a84ba01 100644 (file)
@@ -98,9 +98,6 @@ public class MediaListPlayerTest extends AbstractVLCInternalTest
         libvlc.libvlc_media_list_player_release(mediaListPlayer);
     }
 
-    /**
-     * this fails: see https://trac.videolan.org/vlc/ticket/1527
-     */
     @Test
     public void mediaListPlayerPlay()
     {
@@ -115,7 +112,6 @@ public class MediaListPlayerTest extends AbstractVLCInternalTest
         Assert.assertEquals("Exception message: " + exception.message + ".\n", 0, exception.raised);
         libvlc.libvlc_media_release(mediaDescriptor);
         libvlc.libvlc_media_list_release(mediaList);
-        libvlc.libvlc_media_list_player_release(mediaListPlayer);
     }
 
     @Test