Skip to content

Commit

Permalink
Ignore 2 tests that assume that the system language is English, if th…
Browse files Browse the repository at this point in the history
…at should not be the case (hyperledger#4102)

* ignore 2 tests that assume that the system language is English, if that should not be the case

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
  • Loading branch information
daniellehrner authored and codyborn committed Jul 31, 2022
1 parent 33ab90e commit 54515eb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Add a PoS block header rule to check that the current block is more recent than its parent [#4066](https://github.com/hyperledger/besu/pull/4066)
- Fixed a trie log layer issue on bonsai during reorg [#4069](https://github.com/hyperledger/besu/pull/4069)
- Fix transition protocol schedule to return the pre Merge schedule when reorg pre TTD [#4078](https://github.com/hyperledger/besu/pull/4078)
- The build process runs successfully even though the system language is not English [#4102](https://github.com/hyperledger/besu/pull/4102)

## 22.7.0-RC1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.startsWith;
import static org.hyperledger.besu.cli.config.NetworkName.CLASSIC;
import static org.hyperledger.besu.cli.config.NetworkName.DEV;
import static org.hyperledger.besu.cli.config.NetworkName.GOERLI;
Expand All @@ -41,6 +42,7 @@
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.RINKEBY_DISCOVERY_URL;
import static org.hyperledger.besu.ethereum.worldstate.DataStorageFormat.BONSAI;
import static org.hyperledger.besu.nat.kubernetes.KubernetesNatManager.DEFAULT_BESU_SERVICE_NAME_FILTER;
import static org.junit.Assume.assumeThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNotNull;
Expand Down Expand Up @@ -4755,6 +4757,10 @@ public void eeaWsApisWithPrivacyDisabledLogsWarning() {

@Test
public void privEnclaveKeyFileDoesNotExist() {
assumeThat(
"Ignored if system language is not English",
System.getProperty("user.language"),
startsWith("en"));
parseCommand("--privacy-enabled=true", "--privacy-public-key-file", "/non/existent/file");

assertThat(commandOutput.toString(UTF_8)).isEmpty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import static java.util.stream.Collectors.toList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.hamcrest.Matchers.startsWith;
import static org.hyperledger.besu.ethereum.p2p.NetworkingTestHelper.configWithRandomPorts;
import static org.junit.Assume.assumeThat;

import org.hyperledger.besu.crypto.NodeKey;
import org.hyperledger.besu.crypto.NodeKeyUtils;
Expand Down Expand Up @@ -139,6 +141,10 @@ public void startDiscoveryAgentBackToBack() throws IOException {

@Test
public void startDiscoveryPortInUse() throws IOException {
assumeThat(
"Ignored if system language is not English",
System.getProperty("user.language"),
startsWith("en"));
try (final P2PNetwork service1 = builder().config(config).build()) {
service1.start();
final NetworkingConfiguration config = configWithRandomPorts();
Expand Down

0 comments on commit 54515eb

Please sign in to comment.