diff --git a/src/mod/applications/mod_test/test/test_tts.c b/src/mod/applications/mod_test/test/test_tts.c index e5ec1aa254..83369212d1 100644 --- a/src/mod/applications/mod_test/test/test_tts.c +++ b/src/mod/applications/mod_test/test/test_tts.c @@ -146,7 +146,7 @@ FST_TEST_BEGIN(tts_time) } while (status == SWITCH_STATUS_SUCCESS); fst_check(read = sample_rate / interval * 3); // samples of 3 second - fst_check_duration(3000, 750); + fst_check_duration(3000, 1000); switch_core_speech_close(&sh, &flags); } FST_TEST_END() diff --git a/tests/unit/switch_hold.c b/tests/unit/switch_hold.c index e48865155b..50156e5efe 100644 --- a/tests/unit/switch_hold.c +++ b/tests/unit/switch_hold.c @@ -1,12 +1,21 @@ #include #include +int timeout_sec = 10; +switch_interval_time_t delay_start_ms = 5000; + FST_CORE_DB_BEGIN("./conf_test") { FST_SUITE_BEGIN(switch_hold) { FST_SETUP_BEGIN() { + /* Give mod_sofia time to spinup profile threads */ + if (delay_start_ms) { + switch_sleep(delay_start_ms * 1000); + delay_start_ms = 0; + } + fst_requires_module("mod_sofia"); fst_requires_module("mod_commands"); } @@ -23,7 +32,7 @@ FST_SUITE_BEGIN(switch_hold) switch_status_t status; switch_call_cause_t cause; - status = switch_ivr_originate(NULL, &session, &cause, "{ignore_early_media=true}sofia/gateway/test_gateway/+15553332900", 2, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL, NULL); + status = switch_ivr_originate(NULL, &session, &cause, "{ignore_early_media=true}sofia/gateway/test_gateway/+15553332900", timeout_sec, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL, NULL); fst_requires(session); fst_check(status == SWITCH_STATUS_SUCCESS); diff --git a/tests/unit/switch_ivr_originate.c b/tests/unit/switch_ivr_originate.c index 4cf9695275..5603e18f0e 100644 --- a/tests/unit/switch_ivr_originate.c +++ b/tests/unit/switch_ivr_originate.c @@ -482,7 +482,7 @@ FST_CORE_BEGIN("./conf") switch_dial_handle_destroy(&dh); - fst_check_duration(3000, 500); + fst_check_duration(3000, 600); } FST_TEST_END() @@ -513,7 +513,7 @@ FST_CORE_BEGIN("./conf") switch_dial_handle_destroy(&dh); - fst_check_duration(3000, 500); + fst_check_duration(3000, 600); } FST_TEST_END() diff --git a/tests/unit/switch_sip.c b/tests/unit/switch_sip.c index bcb00eac2b..b535823e12 100644 --- a/tests/unit/switch_sip.c +++ b/tests/unit/switch_sip.c @@ -1,12 +1,21 @@ #include #include +int timeout_sec = 10; +switch_interval_time_t delay_start_ms = 5000; + FST_CORE_DB_BEGIN("./conf_sip") { FST_SUITE_BEGIN(switch_sip) { FST_SETUP_BEGIN() { + /* Give mod_sofia time to spinup profile threads */ + if (delay_start_ms) { + switch_sleep(delay_start_ms * 1000); + delay_start_ms = 0; + } + fst_requires_module("mod_sofia"); fst_requires_module("mod_hash"); } @@ -24,7 +33,7 @@ FST_SUITE_BEGIN(switch_sip) const char *data = "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiI;info="; char *originate_str = switch_mprintf("{sip_h_Identity=%s}sofia/gateway/test_gateway/+15553332901", data); - switch_ivr_originate(NULL, &session, &cause, originate_str, 2, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL, NULL); + switch_ivr_originate(NULL, &session, &cause, originate_str, timeout_sec, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL, NULL); switch_safe_free(originate_str); fst_requires(session); @@ -60,7 +69,7 @@ FST_SUITE_BEGIN(switch_sip) const char *data = "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiI;info=;alg=ES256;ppt=shaken"; char *originate_str = switch_mprintf("{sip_h_Identity=%s}sofia/gateway/test_gateway/+15553332901", data); - switch_ivr_originate(NULL, &session, &cause, originate_str, 2, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL, NULL); + switch_ivr_originate(NULL, &session, &cause, originate_str, timeout_sec, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL, NULL); switch_safe_free(originate_str); fst_requires(session);