rtpsession: make tests more stable
authorHavard Graff <havard.graff@gmail.com>
Thu, 6 Jun 2019 07:41:13 +0000 (09:41 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 20 Jun 2020 19:45:33 +0000 (19:45 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/410>

tests/check/elements/rtpsession.c

index 357e80f..5c3c48c 100644 (file)
@@ -427,6 +427,10 @@ GST_START_TEST (test_multiple_senders_roundrobin_rbs)
 
   g_object_set (h->internal_session, "internal-ssrc", 0xDEADBEEF, NULL);
 
+  /* this is a hack to prevent the sources from timing out when cranking and
+     hence messing with RTCP-generation, making the test fail 1/1000 times */
+  g_object_set (h->session, "rtcp-min-interval", 20 * GST_SECOND, NULL);
+
   for (i = 0; i < 2; i++) {     /* cycles between RR reports */
     for (j = 0; j < 5; j++) {   /* packets per ssrc */
       gint seq = (i * 5) + j;
@@ -633,6 +637,10 @@ GST_START_TEST (test_internal_sources_timeout)
   g_object_get (h->internal_session, "internal-ssrc", &internal_ssrc, NULL);
   fail_unless_equals_int (0xDEADBEEF, internal_ssrc);
 
+  /* this is a hack to prevent the sources from timing out when cranking and
+     hence messing with RTCP-generation, making the test fail 1/100 times */
+  g_object_set (h->session, "rtcp-min-interval", 20 * GST_SECOND, NULL);
+
   for (i = 1; i < 4; i++) {
     buf = generate_test_buffer (i, 0xBEEFDEAD);
     res = session_harness_recv_rtp (h, buf);