[PATCH] tests: Set appropriate timeouts for a couple of tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arun Raghavan <git@xxxxxxxxxxxxxxxx>

sync-playback just had a much longer timeout than it should have, and
extended-test was using the default. We set the expected amount of time,
so the test is more correct (if it takes longer than this, something
probably actually broke).
---
 src/tests/extended-test.c | 2 ++
 src/tests/sync-playback.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/tests/extended-test.c b/src/tests/extended-test.c
index 6c7f991..ee766b8 100644
--- a/src/tests/extended-test.c
+++ b/src/tests/extended-test.c
@@ -209,6 +209,8 @@ int main(int argc, char *argv[]) {
     s = suite_create("Extended");
     tc = tcase_create("extended");
     tcase_add_test(tc, extended_test);
+    /* 4s of audio, 0.5s grace time */
+    tcase_set_timeout(tc, 4.5);
     suite_add_tcase(s, tc);
 
     sr = srunner_create(s);
diff --git a/src/tests/sync-playback.c b/src/tests/sync-playback.c
index 205383d..f06b459 100644
--- a/src/tests/sync-playback.c
+++ b/src/tests/sync-playback.c
@@ -206,7 +206,8 @@ int main(int argc, char *argv[]) {
     s = suite_create("Sync Playback");
     tc = tcase_create("syncplayback");
     tcase_add_test(tc, sync_playback_test);
-    tcase_set_timeout(tc, 5 * 60);
+    /* 4s of audio, 0.5s grace time */
+    tcase_set_timeout(tc, 4.5);
     suite_add_tcase(s, tc);
 
     sr = srunner_create(s);
-- 
2.4.3



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux