diff options
Diffstat (limited to 'tests/common')
| -rw-r--r-- | tests/common/sync_helpers.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/common/sync_helpers.rs b/tests/common/sync_helpers.rs index 7fa0393..e07ad1f 100644 --- a/tests/common/sync_helpers.rs +++ b/tests/common/sync_helpers.rs | |||
| @@ -792,6 +792,14 @@ impl MetricsTestHarness { | |||
| 792 | self.syncing_relay = Some(TestRelay::start_with_sync(Some(source_url)).await); | 792 | self.syncing_relay = Some(TestRelay::start_with_sync(Some(source_url)).await); |
| 793 | } | 793 | } |
| 794 | 794 | ||
| 795 | /// Start syncing relay on a specific port pointing to source[idx] | ||
| 796 | pub async fn start_syncing_relay_on_port(&mut self, source_idx: usize, port: u16) { | ||
| 797 | let source_url = self.source_relays[source_idx].url().to_string(); | ||
| 798 | self.syncing_relay = Some( | ||
| 799 | TestRelay::start_on_port_with_options(port, Some(source_url), false).await, | ||
| 800 | ); | ||
| 801 | } | ||
| 802 | |||
| 795 | /// Start syncing relay pointing to random unused port (for failure tests) | 803 | /// Start syncing relay pointing to random unused port (for failure tests) |
| 796 | pub async fn start_syncing_relay_to_nowhere(&mut self) { | 804 | pub async fn start_syncing_relay_to_nowhere(&mut self) { |
| 797 | let port = random_unused_port(); | 805 | let port = random_unused_port(); |