Fix unit tests that use durations
The tests that used objects that expected a default value for a duration failed due to missing parameters.
This commit is contained in:
@ -61,14 +61,18 @@ static int test1()
|
||||
set_libdir(MXS_STRDUP_A("../../modules/routing/readconnroute/"));
|
||||
load_module("readconnroute", MODULE_ROUTER);
|
||||
|
||||
MXS_CONFIG_PARAMETER parameters;
|
||||
parameters.set(CN_MAX_RETRY_INTERVAL, "10s");
|
||||
parameters.set(CN_CONNECTION_TIMEOUT, "10s");
|
||||
|
||||
/* Service tests */
|
||||
fprintf(stderr,
|
||||
"testservice : creating service called MyService with router nonexistent");
|
||||
service = service_alloc("MyService", "non-existent", NULL);
|
||||
service = service_alloc("MyService", "non-existent", ¶meters);
|
||||
mxb_assert_message(NULL == service, "New service with invalid router should be null");
|
||||
mxb_assert_message(0 == service_isvalid(service), "Service must not be valid after incorrect creation");
|
||||
fprintf(stderr, "\t..done\nValid service creation, router testroute.");
|
||||
service = service_alloc("MyService", "readconnroute", NULL);
|
||||
service = service_alloc("MyService", "readconnroute", ¶meters);
|
||||
|
||||
mxb_assert_message(NULL != service, "New service with valid router must not be null");
|
||||
mxb_assert_message(0 != service_isvalid(service), "Service must be valid after creation");
|
||||
|
||||
Reference in New Issue
Block a user