Skip to content

Commit

Permalink
Merge branch 'main' into FixLogging
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Jul 31, 2021
2 parents 01517a3 + a9b2f9f commit 2cad1c0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdk/test/common/circular_buffer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ void RunNumberConsumer(CircularBuffer<uint32_t> &buffer,
{
while (true)
{
auto allotment = buffer.Peek();
if (exit && allotment.empty())
if (exit && buffer.Peek().empty())
{
return;
}
auto n = std::uniform_int_distribution<size_t>{0, allotment.size()}(RandomNumberGenerator);
auto n = std::uniform_int_distribution<size_t>{0, buffer.Peek().size()}(RandomNumberGenerator);
buffer.Consume(n, [&](CircularBufferRange<AtomicUniquePtr<uint32_t>> range) noexcept {
assert(range.size() == n);
range.ForEach([&](AtomicUniquePtr<uint32_t> &ptr) noexcept {
Expand Down

0 comments on commit 2cad1c0

Please sign in to comment.