Skip to content

Commit 860886b

Browse files
committed
test(p2p): fix idle handler
1 parent 00a2e2e commit 860886b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

node/testing/src/scenarios/driver.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ impl<'cluster> Driver<'cluster> {
139139
for (node_id, state, events) in self.runner.pending_events() {
140140
for (_, event) in events {
141141
if f(node_id, event, state) {
142-
eprintln!("!!! {node_id}: {event:?}");
142+
println!("!!! {node_id}: {event:?}");
143143
found = Some((node_id, event.clone()));
144144
break;
145145
} else {
146-
eprintln!(">>> {node_id}: {event:?}");
146+
println!(">>> {node_id}: {event:?}");
147147
let event = event.to_string();
148148
steps.push(ScenarioStep::Event { node_id, event });
149149
}
@@ -177,10 +177,10 @@ impl<'cluster> Driver<'cluster> {
177177
event: event.to_string(),
178178
});
179179
if found {
180-
eprintln!("!!! {node_id}: {event:?}");
180+
println!("!!! {node_id}: {event:?}");
181181
break 'pending_events;
182182
} else {
183-
eprintln!(">>> {node_id}: {event:?}");
183+
println!(">>> {node_id}: {event:?}");
184184
}
185185
}
186186
}
@@ -207,7 +207,7 @@ impl<'cluster> Driver<'cluster> {
207207
self.sleep(duration).await;
208208
self.runner
209209
.exec_step(ScenarioStep::AdvanceTime {
210-
by_nanos: 10 * 1_000_000,
210+
by_nanos: duration.as_nanos().try_into()?,
211211
})
212212
.await?;
213213
let nodes = self

0 commit comments

Comments
 (0)