validate: tools: Change timeouts depending on used protocol
authorThibault Saunier <thibault.saunier@collabora.com>
Fri, 24 Jan 2014 10:31:42 +0000 (11:31 +0100)
committerThibault Saunier <thibault.saunier@collabora.com>
Wed, 12 Feb 2014 10:23:25 +0000 (11:23 +0100)
validate/tools/launcher/apps/gst-validate.py

index c63438d..04da55a 100644 (file)
@@ -51,11 +51,18 @@ class NamedDic(object):
     def __init__(self, props):
         for name, value in props.iteritems():
             setattr(self, name, value)
+PROTOCOL_TIMEOUTS = {"http": 60,
+                     "hls": 60}
 
 
 class GstValidateLaunchTest(GstValidateTest):
     def __init__(self, classname, options, reporter, pipeline_desc,
                  timeout=DEFAULT_TIMEOUT, scenario=None, file_infos=None):
+        try:
+            timeout = PROTOCOL_TIMEOUTS[file_infos.get("file-info", "protocol")]
+        except KeyError:
+            pass
+
         super(GstValidateLaunchTest, self).__init__(DEFAULT_GST_VALIDATE, classname,
                                               options, reporter,
                                               scenario=scenario,)