Skip to content

Commit 397251c

Browse files
committed
code coverage fix
1 parent af2cb87 commit 397251c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

test/unit/body_write_stream.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -657,19 +657,21 @@ struct body_write_stream_test
657657

658658
// async_read_some reads the body for various chunk
659659
// sizes.
660-
if (false) {
661-
int sizes[] = { 1, 2, 5, 13, 233, 1597, 10'000, 100'000 };
660+
if (true) {
661+
int sizes[] = { 1, 2, 13, 1597, 100'000 };
662662
// Iterate through buffer sizes
663663
for(std::size_t bs: sizes)
664664
{
665665
std::cout << "bs: " << bs << std::endl;
666666
// Iterate through chunk sizes
667667
for(std::size_t cs : sizes)
668668
{
669-
if(cs > bs / 100)
669+
if(cs > bs / 10000)
670670
{
671-
std::cout << "bs: " << bs << " cs: " << cs << std::endl;
672-
single_tester().test_with_chunking(bs, cs);
671+
int iters = std::min((size_t)10, (cs / bs) + 1);
672+
std::cout << "bs: " << bs << " cs: " << cs
673+
<< " iters: " << iters << std::endl;
674+
single_tester().test_with_chunking(bs, cs, iters);
673675
}
674676
}
675677
}

0 commit comments

Comments
 (0)