mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
test: Don't reuse on-stack input stream
The test consists of several snippets, each creating an input_stream for some short operation and checking the result. Each snipped over-writes the local `input_stream in` variable with the new one. This change wraps each of those snippets into own code block in order to have own new `input_stream in` variable in each. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -692,36 +692,48 @@ SEASTAR_TEST_CASE(test_skipping_in_compressed_stream) {
|
||||
BOOST_REQUIRE(b.empty());
|
||||
};
|
||||
|
||||
{
|
||||
auto in = make_is();
|
||||
expect(in, buf1);
|
||||
expect(in, buf2);
|
||||
expect_eof(in);
|
||||
}
|
||||
|
||||
in = make_is();
|
||||
{
|
||||
auto in = make_is();
|
||||
in.skip(0).get();
|
||||
expect(in, buf1);
|
||||
expect(in, buf2);
|
||||
expect_eof(in);
|
||||
}
|
||||
|
||||
in = make_is();
|
||||
{
|
||||
auto in = make_is();
|
||||
expect(in, buf1);
|
||||
in.skip(0).get();
|
||||
expect(in, buf2);
|
||||
expect_eof(in);
|
||||
}
|
||||
|
||||
in = make_is();
|
||||
{
|
||||
auto in = make_is();
|
||||
expect(in, buf1);
|
||||
in.skip(opts.buffer_size).get();
|
||||
expect_eof(in);
|
||||
}
|
||||
|
||||
in = make_is();
|
||||
{
|
||||
auto in = make_is();
|
||||
in.skip(opts.buffer_size * 2).get();
|
||||
expect_eof(in);
|
||||
}
|
||||
|
||||
in = make_is();
|
||||
{
|
||||
auto in = make_is();
|
||||
in.skip(opts.buffer_size).get();
|
||||
in.skip(opts.buffer_size).get();
|
||||
expect_eof(in);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user