Skip to content

Commit 1949cc7

Browse files
committed
sim-rs: fix intermittent test failure
1 parent 1dc528b commit 1949cc7

File tree

1 file changed

+2
-2
lines changed
  • sim-rs/sim-cli/src/bin/gen-test-data/strategy

1 file changed

+2
-2
lines changed

sim-rs/sim-cli/src/bin/gen-test-data/strategy/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ impl GraphBuilder {
6262
let loc1 = to_netsim_location(self.location_of(node));
6363
let loc2 = to_netsim_location(self.location_of(producer));
6464
latency_between_locations(loc1, loc2, 1.)
65-
.unwrap()
66-
.to_duration()
65+
.map(|d| d.to_duration())
66+
.unwrap_or_default()
6767
.max(Duration::from_millis(1))
6868
});
6969
self.links.push(RawLinkConfig {

0 commit comments

Comments
 (0)