From fa4bf950917b43c0253b6dd5926e24f1eb1b92a8 Mon Sep 17 00:00:00 2001 From: Omar Abdulla Date: Tue, 15 Jul 2025 13:57:31 +0300 Subject: [PATCH] Add comment on alternative solutions --- crates/node/src/kitchensink.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/node/src/kitchensink.rs b/crates/node/src/kitchensink.rs index 2872614..6b4689b 100644 --- a/crates/node/src/kitchensink.rs +++ b/crates/node/src/kitchensink.rs @@ -1047,6 +1047,14 @@ mod tests { // a dummy mutex here such that there can only be a single node being // started up at any point of time. This will make our tests run slower // but it will allow the node startup to not timeout. + // + // Note: an alternative to starting all of the nodes in series and not + // in parallel would be for us to reuse the same node between tests + // which is not the best thing to do in my opinion as it removes all + // of the isolation between tests and makes them depend on what other + // tests do. For example, if one test checks what the block number is + // and another test submits a transaction then the tx test would have + // side effects that affect the block number test. static NODE_START_MUTEX: Mutex<()> = Mutex::new(()); let _guard = NODE_START_MUTEX.lock().unwrap();