Skip to content

Commit 217a037

Browse files
authored
Merge pull request ceph#59746 from arm7star/main
test/crimson/test_messenger_thrash: fix a local variable scope issue Reviewed-by: Matan Breizman <[email protected]> Reviewed-by: Yingxin Cheng <[email protected]>
2 parents 91d3bcf + e4434fe commit 217a037

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/test/crimson/test_messenger_thrash.cc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -447,15 +447,16 @@ class SyntheticWorkload {
447447
}
448448

449449
seastar::future<> wait_for_done() {
450-
int i = 0;
451-
return seastar::do_until(
452-
[this] { return !dispatcher.get_num_pending_msgs(); },
453-
[this, &i]
454-
{
455-
if (i++ % 50 == 0){
456-
print_internal_state(true);
457-
}
458-
return seastar::sleep(100ms);
450+
return seastar::do_with(0, [this] (int &i) {
451+
return seastar::do_until(
452+
[this] { return !dispatcher.get_num_pending_msgs(); },
453+
[this, &i] {
454+
if (i++ % 50 == 0) {
455+
print_internal_state(true);
456+
}
457+
return seastar::sleep(100ms);
458+
}
459+
);
459460
}).then([this] {
460461
return seastar::do_for_each(available_servers, [] (auto server) {
461462
if (verbose) {

0 commit comments

Comments
 (0)