diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-02-22 15:39:30 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2021-02-22 15:39:30 -0500 |
commit | 890780054975e0c5eb95b097deb6fac53640f66d (patch) | |
tree | a4593a5168d01b3ce3820e21cccd31334a3918f6 /src/test/test_dir.c | |
parent | 6e3a7c410f2c0cfd2f705862cc4d32acd0a88096 (diff) | |
parent | d98c77b78e9ce945a7a0de151d5f5cf44061edd5 (diff) | |
download | tor-890780054975e0c5eb95b097deb6fac53640f66d.tar.gz tor-890780054975e0c5eb95b097deb6fac53640f66d.zip |
Merge remote-tracking branch 'tor-gitlab/mr/319'
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index bb2bc6ad21..9646ed8d87 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -5467,31 +5467,6 @@ dir_tests_directory_initiate_request(directory_request_t *req) dir_tests_directory_initiate_request_called++; } -static void -test_dir_choose_compression_level(void* data) -{ - (void)data; - - /* It starts under_memory_pressure */ - tt_int_op(have_been_under_memory_pressure(), OP_EQ, 1); - - tt_assert(HIGH_COMPRESSION == choose_compression_level(-1)); - tt_assert(LOW_COMPRESSION == choose_compression_level(1024-1)); - tt_assert(MEDIUM_COMPRESSION == choose_compression_level(2048-1)); - tt_assert(HIGH_COMPRESSION == choose_compression_level(2048)); - - /* Reset under_memory_pressure timer */ - cell_queues_check_size(); - tt_int_op(have_been_under_memory_pressure(), OP_EQ, 0); - - tt_assert(HIGH_COMPRESSION == choose_compression_level(-1)); - tt_assert(HIGH_COMPRESSION == choose_compression_level(1024-1)); - tt_assert(HIGH_COMPRESSION == choose_compression_level(2048-1)); - tt_assert(HIGH_COMPRESSION == choose_compression_level(2048)); - - done: ; -} - /* * Mock check_private_dir(), and always succeed - no need to actually * look at or create anything on the filesystem. @@ -7296,7 +7271,6 @@ struct testcase_t dir_tests[] = { DIR(should_not_init_request_to_ourselves, TT_FORK), DIR(should_not_init_request_to_dir_auths_without_v3_info, 0), DIR(should_init_request_to_dir_auths, 0), - DIR(choose_compression_level, 0), DIR(dump_unparseable_descriptors, 0), DIR(populate_dump_desc_fifo, 0), DIR(populate_dump_desc_fifo_2, 0), |