Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jul 19, 2024
1 parent 091b545 commit 9eb3013
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,24 @@ public void allSubnetsShouldNotOverrideQueuesIfExplicitlySet() {
.isEqualTo(15_120);
assertThat(tekuConfiguration.p2p().getBatchVerifyQueueCapacity()).isEqualTo(15_220);
}

@Test
public void defaultPortsAreSetCorrectly() {
final TekuConfiguration tekuConfiguration = getTekuConfigurationFromArguments();

final DiscoveryConfig discoveryConfig = tekuConfiguration.discovery();
assertThat(discoveryConfig.getListenUdpPort()).isEqualTo(NetworkConfig.DEFAULT_P2P_PORT);
assertThat(discoveryConfig.getListenUpdPortIpv6())
.isEqualTo(NetworkConfig.DEFAULT_P2P_PORT_IPV6);
assertThat(discoveryConfig.getAdvertisedUdpPort()).isEqualTo(NetworkConfig.DEFAULT_P2P_PORT);
assertThat(discoveryConfig.getAdvertisedUdpPortIpv6())
.isEqualTo(NetworkConfig.DEFAULT_P2P_PORT_IPV6);

final NetworkConfig networkConfig = tekuConfiguration.network();
assertThat(networkConfig.getListenPort()).isEqualTo(NetworkConfig.DEFAULT_P2P_PORT);
assertThat(networkConfig.getListenPortIpv6()).isEqualTo(NetworkConfig.DEFAULT_P2P_PORT_IPV6);
assertThat(networkConfig.getAdvertisedPort()).isEqualTo(NetworkConfig.DEFAULT_P2P_PORT);
assertThat(networkConfig.getAdvertisedPortIpv6())
.isEqualTo(NetworkConfig.DEFAULT_P2P_PORT_IPV6);
}
}

0 comments on commit 9eb3013

Please sign in to comment.