Skip to content

Commit 39f5e7b

Browse files
committed
fix(test): Use current time as starting time in pubsub test
1 parent 250aa71 commit 39f5e7b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

node/testing/src/node/rust/config.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ impl RustNodeTestingConfig {
9999
self
100100
}
101101

102+
pub fn initial_time(mut self, time: redux::Timestamp) -> Self {
103+
self.initial_time = time;
104+
self
105+
}
106+
102107
pub fn with_peer_id(mut self, bytes: [u8; 32]) -> Self {
103108
self.peer_id = TestPeerId::Bytes(bytes);
104109
self

node/testing/src/scenarios/p2p/pubsub.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ pub struct P2pReceiveMessage;
1818

1919
impl P2pReceiveMessage {
2020
pub async fn run(self, mut runner: ClusterRunner<'_>) {
21-
let config = RustNodeTestingConfig::devnet_default().initial_peers(hosts::devnet());
21+
let config = RustNodeTestingConfig::devnet_default()
22+
.initial_peers(hosts::devnet())
23+
.initial_time(redux::Timestamp::global_now());
2224

2325
let retransmitter_openmina_node = runner.add_rust_node(config);
2426

0 commit comments

Comments
 (0)