From 9ffc1048aa87038d0b22cc97ce60f539f4d6fcc6 Mon Sep 17 00:00:00 2001 From: b-yap <2826165+b-yap@users.noreply.github.com> Date: Fri, 22 Sep 2023 17:51:37 +0800 Subject: [PATCH] fix https://github.com/pendulum-chain/spacewalk/actions/runs/6263576242/job/17008273208?pr=393#step:12:894 --- .../config/testnet/stellar_relay_config_sdftest1.json | 6 +++--- .../config/testnet/stellar_relay_config_sdftest2.json | 6 +++--- .../config/testnet/stellar_relay_config_sdftest3.json | 6 +++--- clients/stellar-relay-lib/src/tests/mod.rs | 5 ++++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest1.json b/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest1.json index 942bfd161..2fc5026d4 100644 --- a/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest1.json +++ b/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest1.json @@ -4,10 +4,10 @@ "port": 11625 }, "node_info": { - "ledger_version": 19, - "overlay_version": 28, + "ledger_version": 20, + "overlay_version": 30, "overlay_min_version": 27, - "version_str": "stellar-core 19.12.0.rc2 (2109a168a895349f87b502ae3d182380b378fa47)", + "version_str": "stellar-core 20.0.0.rc1 (ecb24df104c2453a00fa5097d2e879d7731b9596)", "is_pub_net": false }, "stellar_history_archive_urls": [] diff --git a/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest2.json b/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest2.json index bc909e6d3..915ad9b52 100644 --- a/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest2.json +++ b/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest2.json @@ -4,10 +4,10 @@ "port": 11625 }, "node_info": { - "ledger_version": 19, - "overlay_version": 28, + "ledger_version": 20, + "overlay_version": 30, "overlay_min_version": 27, - "version_str": "stellar-core 19.12.0.rc2 (2109a168a895349f87b502ae3d182380b378fa47)", + "version_str": "stellar-core 20.0.0.rc1 (ecb24df104c2453a00fa5097d2e879d7731b9596)", "is_pub_net": false }, "stellar_history_archive_urls": [] diff --git a/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest3.json b/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest3.json index 739dcd151..8b4fc2f22 100644 --- a/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest3.json +++ b/clients/stellar-relay-lib/resources/config/testnet/stellar_relay_config_sdftest3.json @@ -4,10 +4,10 @@ "port": 11625 }, "node_info": { - "ledger_version": 19, - "overlay_version": 28, + "ledger_version": 20, + "overlay_version": 30, "overlay_min_version": 27, - "version_str": "stellar-core 19.12.0.rc2 (2109a168a895349f87b502ae3d182380b378fa47)", + "version_str": "stellar-core 20.0.0.rc1 (ecb24df104c2453a00fa5097d2e879d7731b9596)", "is_pub_net": false }, "stellar_history_archive_urls": [] diff --git a/clients/stellar-relay-lib/src/tests/mod.rs b/clients/stellar-relay-lib/src/tests/mod.rs index e11d9573b..d8841522e 100644 --- a/clients/stellar-relay-lib/src/tests/mod.rs +++ b/clients/stellar-relay-lib/src/tests/mod.rs @@ -10,6 +10,7 @@ use crate::{ }; use serial_test::serial; use tokio::{sync::Mutex, time::timeout}; +use tokio::time::sleep; fn secret_key() -> String { std::fs::read_to_string("./resources/secretkey/stellar_secretkey_testnet") @@ -104,7 +105,7 @@ async fn stellar_overlay_should_receive_tx_set() { let tx_set_vec = Arc::new(Mutex::new(vec![])); let tx_set_vec_clone = tx_set_vec.clone(); - timeout(Duration::from_secs(300), async move { + timeout(Duration::from_secs(500), async move { let mut ov_conn_locked = ov_conn.lock().await; while let Some(relay_message) = ov_conn_locked.listen().await { @@ -118,6 +119,8 @@ async fn stellar_overlay_should_receive_tx_set() { .send(StellarMessage::GetTxSet(txset_hash)) .await .unwrap(); + // let it sleep to wait for the `TxSet` message to appear + sleep(Duration::from_secs(5)).await; }, StellarMessage::TxSet(set) => { tx_set_vec_clone.lock().await.push(set);