[vlc-devel] commit: jvlc tests: avoid a libvlc_media_player race condition ( Filippo Carone )
git version control
git at videolan.org
Sun Jul 20 11:25:49 CEST 2008
vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Sun Jul 20 11:24:33 2008 +0200| [b1f976cd8a843b72efb13e8deb9571b18244b982]
jvlc tests: avoid a libvlc_media_player race condition
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1f976cd8a843b72efb13e8deb9571b18244b982
---
...nstanceTest.java => LibVlcMediaPlayerTest.java} | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaInstanceTest.java b/bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaPlayerTest.java
similarity index 97%
rename from bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaInstanceTest.java
rename to bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaPlayerTest.java
index 3b97110..e421e23 100644
--- a/bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaInstanceTest.java
+++ b/bindings/java/core/src/test/java/org/videolan/jvlc/internal/LibVlcMediaPlayerTest.java
@@ -35,7 +35,7 @@ import org.videolan.jvlc.internal.LibVlc.LibVlcMediaInstance;
import org.videolan.jvlc.internal.LibVlc.libvlc_exception_t;
-public class LibVlcMediaInstanceTest
+public class LibVlcMediaPlayerTest
{
private LibVlc libvlc = LibVlc.SYNC_INSTANCE;
@@ -127,11 +127,12 @@ public class LibVlcMediaInstanceTest
}
@Test
- public void mediaInstanceStop2()
+ public void mediaInstanceStop2() throws Exception
{
LibVlcMediaDescriptor md = libvlc.libvlc_media_new(libvlcInstance, mrl, exception);
LibVlcMediaInstance mi = libvlc.libvlc_media_player_new_from_media(md, exception);
libvlc.libvlc_media_player_play(mi, exception);
+ Thread.sleep(100);
libvlc.libvlc_media_player_stop(mi, exception);
Assert.assertEquals(0, exception.raised);
}
More information about the vlc-devel
mailing list