diff --git a/tests/app/app-init.c b/tests/app/app-init.c index acf09025a..5900967c3 100644 --- a/tests/app/app-init.c +++ b/tests/app/app-init.c @@ -54,14 +54,32 @@ int app_initialize(const char *const argv[]) pcrf_thread = test_child_create("pcrf", argv_out); if (ogs_config()->parameter.no_hss == 0) hss_thread = test_child_create("hss", argv_out); + + /* + * To avoid freeDiameter error + * + * ROUTING ERROR + * 'No remaining suitable candidate to route the message to' for: + */ + ogs_msleep(300); + if (ogs_config()->parameter.no_upf == 0) upf_thread = test_child_create("upf", argv_out); if (ogs_config()->parameter.no_sgwu == 0) sgwu_thread = test_child_create("sgwu", argv_out); - if (ogs_config()->parameter.no_smf == 0) - smf_thread = test_child_create("smf", argv_out); if (ogs_config()->parameter.no_sgwc == 0) sgwc_thread = test_child_create("sgwc", argv_out); + + /* + * To avoid freeDiameter error + * + * ROUTING ERROR + * 'No remaining suitable candidate to route the message to' for: + */ + ogs_msleep(300); + + if (ogs_config()->parameter.no_smf == 0) + smf_thread = test_child_create("smf", argv_out); if (ogs_config()->parameter.no_mme == 0) mme_thread = test_child_create("mme", argv_out); diff --git a/tests/app/epc-init.c b/tests/app/epc-init.c index 06757dfd6..cd14e2691 100644 --- a/tests/app/epc-init.c +++ b/tests/app/epc-init.c @@ -55,15 +55,33 @@ int app_initialize(const char *const argv[]) pcrf_thread = test_child_create("pcrf", argv_out); if (ogs_config()->parameter.no_hss == 0) hss_thread = test_child_create("hss", argv_out); + + /* + * To avoid freeDiameter error + * + * ROUTING ERROR + * 'No remaining suitable candidate to route the message to' for: + */ + ogs_msleep(300); + if (ogs_config()->parameter.no_upf == 0) upf_thread = test_child_create("upf", argv_out); if (ogs_config()->parameter.no_sgwu == 0) sgwu_thread = test_child_create("sgwu", argv_out); - if (ogs_config()->parameter.no_smf == 0) - smf_thread = test_child_create("smf", argv_out); if (ogs_config()->parameter.no_sgwc == 0) sgwc_thread = test_child_create("sgwc", argv_out); + /* + * To avoid freeDiameter error + * + * ROUTING ERROR + * 'No remaining suitable candidate to route the message to' for: + */ + ogs_msleep(300); + + if (ogs_config()->parameter.no_smf == 0) + smf_thread = test_child_create("smf", argv_out); + ogs_sctp_init(ogs_config()->usrsctp.udp_port); rv = mme_initialize(); diff --git a/tests/csfb/abts-main.c b/tests/csfb/abts-main.c index c584ab062..29203c30d 100644 --- a/tests/csfb/abts-main.c +++ b/tests/csfb/abts-main.c @@ -88,15 +88,34 @@ static void initialize(const char *const argv[]) pcrf_thread = test_child_create("pcrf", argv); if (ogs_config()->parameter.no_hss == 0) hss_thread = test_child_create("hss", argv); + + /* + * To avoid freeDiameter error + * + * ROUTING ERROR + * 'No remaining suitable candidate to route the message to' for: + */ + ogs_msleep(300); + if (ogs_config()->parameter.no_upf == 0) upf_thread = test_child_create("upf", argv); if (ogs_config()->parameter.no_sgwu == 0) sgwu_thread = test_child_create("sgwu", argv); - if (ogs_config()->parameter.no_smf == 0) - smf_thread = test_child_create("smf", argv); if (ogs_config()->parameter.no_sgwc == 0) sgwc_thread = test_child_create("sgwc", argv); + + /* + * To avoid freeDiameter error + * + * ROUTING ERROR + * 'No remaining suitable candidate to route the message to' for: + */ + ogs_msleep(300); + + if (ogs_config()->parameter.no_smf == 0) + smf_thread = test_child_create("smf", argv); + test_epc_init(); ogs_sctp_init(ogs_config()->usrsctp.udp_port); diff --git a/tests/cups/abts-main.c b/tests/cups/abts-main.c index 39478368a..14cd46be1 100644 --- a/tests/cups/abts-main.c +++ b/tests/cups/abts-main.c @@ -54,6 +54,14 @@ static void initialize(const char *const argv[]) rv = app_initialize(argv); ogs_assert(rv == OGS_OK); + /* + * To avoid freeDiameter error + * + * ROUTING ERROR + * 'No remaining suitable candidate to route the message to' for: + */ + ogs_msleep(300); + rv = pcscf_fd_init(); ogs_assert(rv == OGS_OK); } @@ -65,7 +73,6 @@ int main(int argc, const char *const argv[]) atexit(terminate); test_5gc_run(argc, argv, "cups.yaml", initialize); - ogs_msleep(1000); for (i = 0; alltests[i].func; i++) suite = alltests[i].func(suite); diff --git a/tests/mnc3/abts-main.c b/tests/mnc3/abts-main.c index aa45c2019..fd481e7bf 100644 --- a/tests/mnc3/abts-main.c +++ b/tests/mnc3/abts-main.c @@ -58,7 +58,6 @@ int main(int argc, const char *const argv[]) atexit(terminate); test_5gc_run(argc, argv, "mnc3.yaml", initialize); - ogs_msleep(1000); for (i = 0; alltests[i].func; i++) suite = alltests[i].func(suite); diff --git a/tests/volte/abts-main.c b/tests/volte/abts-main.c index a12b60952..7811e9e48 100644 --- a/tests/volte/abts-main.c +++ b/tests/volte/abts-main.c @@ -54,6 +54,14 @@ static void initialize(const char *const argv[]) rv = app_initialize(argv); ogs_assert(rv == OGS_OK); + /* + * To avoid freeDiameter error + * + * ROUTING ERROR + * 'No remaining suitable candidate to route the message to' for: + */ + ogs_msleep(300); + rv = pcscf_fd_init(); ogs_assert(rv == OGS_OK); } @@ -65,7 +73,6 @@ int main(int argc, const char *const argv[]) atexit(terminate); test_5gc_run(argc, argv, "volte.yaml", initialize); - ogs_msleep(1000); for (i = 0; alltests[i].func; i++) suite = alltests[i].func(suite);