Skip to content

Commit dd9036c

Browse files
committed
Fix block exporter port collisions in local net tests
block_exporter_port (+3000) collided with proxy_metrics_port (+3000) and block_exporter_metrics_port (+4000) collided with proxy_public_port (+4000).
1 parent ff16457 commit dd9036c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

linera-service/src/cli_wrappers/local_net.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ impl LocalNet {
507507
}
508508

509509
fn block_exporter_port(&self, validator: usize, exporter_id: usize) -> usize {
510-
test_offset_port() + 3000 + validator * self.num_shards + exporter_id + 1
510+
test_offset_port() + 5000 + validator * self.num_shards + exporter_id + 1
511511
}
512512

513513
pub fn proxy_public_port(&self, validator: usize, proxy_id: usize) -> usize {
@@ -519,7 +519,7 @@ impl LocalNet {
519519
}
520520

521521
fn block_exporter_metrics_port(&self, validator: usize, exporter_id: usize) -> usize {
522-
test_offset_port() + 4000 + validator * self.num_shards + exporter_id + 1
522+
test_offset_port() + 6000 + validator * self.num_shards + exporter_id + 1
523523
}
524524

525525
fn configuration_string(&self, server_number: usize) -> Result<String> {

linera-service/src/exporter/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async fn test_linera_exporter(database: Database, network: Network) -> Result<()
4949
port: 0,
5050
},
5151
limits: LimitsConfig::default(),
52-
metrics_port: 1234,
52+
metrics_port: 0,
5353
};
5454

5555
let config = LocalNetConfig {

0 commit comments

Comments
 (0)