querier_cache_test: use local semaphore not the test global one

In the mutation source, which creates the reader for this test, the
global test semaphore's permit was passed to the created reader
(`tests::make_permit()`). This caused reader resources to be accounted
on the global test semaphore, instead of the local one the test creates.
Just forward the permit passed to the mutation sources to the reader to
fix this.
This commit is contained in:
Botond Dénes
2020-10-06 08:08:55 +03:00
parent 73a6b97c75
commit f7eea06f61

View File

@@ -163,8 +163,8 @@ public:
: _sem(reader_concurrency_semaphore::no_limits{})
, _cache(cache_size, entry_ttl)
, _mutations(make_mutations(_s, external_make_value))
, _mutation_source([this] (schema_ptr, reader_permit, const dht::partition_range& range) {
auto rd = flat_mutation_reader_from_mutations(tests::make_permit(), _mutations, range);
, _mutation_source([this] (schema_ptr, reader_permit permit, const dht::partition_range& range) {
auto rd = flat_mutation_reader_from_mutations(std::move(permit), _mutations, range);
rd.set_max_buffer_size(max_reader_buffer_size);
return rd;
}) {