summaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2020-04-16 18:27:26 +0300
committerAndrei Belov <defan@nginx.com>2020-04-16 18:27:26 +0300
commit74f32d26b91f49d3392605e81c1597b375890b60 (patch)
treeadfc67dfc86461441bde65512f745ce27bd6ea28 /src/test
parent2ff9df10ef1df43c935c870175e52473dad2c21a (diff)
parent9877087756144d3bdf343d0d4e91e1efbcc62c93 (diff)
downloadunit-74f32d26b91f49d3392605e81c1597b375890b60.tar.gz
unit-74f32d26b91f49d3392605e81c1597b375890b60.tar.bz2
Merged with the default branch.1.17.0-1
Diffstat (limited to 'src/test')
-rw-r--r--src/test/nxt_clone_test.c6
-rw-r--r--src/test/nxt_http_parse_test.c17
2 files changed, 8 insertions, 15 deletions
diff --git a/src/test/nxt_clone_test.c b/src/test/nxt_clone_test.c
index 15d36557..64b9ddea 100644
--- a/src/test/nxt_clone_test.c
+++ b/src/test/nxt_clone_test.c
@@ -588,13 +588,13 @@ nxt_clone_test_parse_map(nxt_task_t *task, nxt_str_t *map_str,
obj = nxt_conf_get_array_element(array, i);
value = nxt_conf_get_object_member(obj, &host_name, NULL);
- map->map[i].host = nxt_conf_get_integer(value);
+ map->map[i].host = nxt_conf_get_number(value);
value = nxt_conf_get_object_member(obj, &cont_name, NULL);
- map->map[i].container = nxt_conf_get_integer(value);
+ map->map[i].container = nxt_conf_get_number(value);
value = nxt_conf_get_object_member(obj, &size_name, NULL);
- map->map[i].size = nxt_conf_get_integer(value);
+ map->map[i].size = nxt_conf_get_number(value);
}
return NXT_OK;
diff --git a/src/test/nxt_http_parse_test.c b/src/test/nxt_http_parse_test.c
index 8dcbc061..9630b21c 100644
--- a/src/test/nxt_http_parse_test.c
+++ b/src/test/nxt_http_parse_test.c
@@ -510,7 +510,7 @@ static nxt_str_t nxt_http_test_big_request = nxt_string(
nxt_int_t
nxt_http_parse_test(nxt_thread_t *thr)
{
- nxt_mp_t *mp, *mp_temp;
+ nxt_mp_t *mp_temp;
nxt_int_t rc;
nxt_uint_t i, colls, lvl_colls;
nxt_lvlhsh_t hash;
@@ -519,12 +519,7 @@ nxt_http_parse_test(nxt_thread_t *thr)
nxt_thread_time_update(thr);
- mp = nxt_mp_create(1024, 128, 256, 32);
- if (mp == NULL) {
- return NXT_ERROR;
- }
-
- rc = nxt_http_fields_hash(&nxt_http_test_fields_hash, mp,
+ rc = nxt_http_fields_hash(&nxt_http_test_fields_hash,
nxt_http_test_fields,
nxt_nitems(nxt_http_test_fields));
if (rc != NXT_OK) {
@@ -569,14 +564,14 @@ nxt_http_parse_test(nxt_thread_t *thr)
nxt_memzero(&hash, sizeof(nxt_lvlhsh_t));
- colls = nxt_http_fields_hash_collisions(&hash, mp,
+ colls = nxt_http_fields_hash_collisions(&hash,
nxt_http_test_bench_fields,
nxt_nitems(nxt_http_test_bench_fields),
0);
nxt_memzero(&hash, sizeof(nxt_lvlhsh_t));
- lvl_colls = nxt_http_fields_hash_collisions(&hash, mp,
+ lvl_colls = nxt_http_fields_hash_collisions(&hash,
nxt_http_test_bench_fields,
nxt_nitems(nxt_http_test_bench_fields),
1);
@@ -587,7 +582,7 @@ nxt_http_parse_test(nxt_thread_t *thr)
nxt_memzero(&hash, sizeof(nxt_lvlhsh_t));
- rc = nxt_http_fields_hash(&hash, mp, nxt_http_test_bench_fields,
+ rc = nxt_http_fields_hash(&hash, nxt_http_test_bench_fields,
nxt_nitems(nxt_http_test_bench_fields));
if (rc != NXT_OK) {
return NXT_ERROR;
@@ -607,8 +602,6 @@ nxt_http_parse_test(nxt_thread_t *thr)
return NXT_ERROR;
}
- nxt_mp_destroy(mp);
-
return NXT_OK;
}