Skip to content

Commit 1dfd8ed

Browse files
gabrieledmmacfarla
andauthored
[BESU-8999] Strange behavior for MiningOptionsTest (#9422)
* [BESU-8999] Fix issue #8999 * Populated org.hyperledger.besu.util.BesuVersionUtils.VERSION with a default value instead of leaving it null * Updated regex in tests to spot the new default value for VERSION Signed-off-by: Gabriele Del Monte <gabriele.delmonte@proton.me> * [BESU-8999] Fix issue #8999 * Used null as a default value for version * Updated regex in tests to match null case Signed-off-by: Gabriele Del Monte <gabriele.delmonte@proton.me> * adjust comment Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Gabriele Del Monte <gabriele.delmonte@proton.me> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
1 parent 61b6c2b commit 1dfd8ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/test/java/org/hyperledger/besu/cli/options/MiningOptionsTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,9 @@ public void pluginBlockTxsSelectionMaxTimeOptionNonPoaNetwork() {
358358

359359
@Test
360360
public void extraDataDefaultValueIsBesuVersion() {
361-
final var expectedRegex = "besu \\d+\\.\\d+(\\.\\d+|\\-develop\\-\\p{XDigit}+)";
361+
// Detect also a string with null at the end (case in which metadata are missing because the
362+
// JAR is not generated)
363+
final var expectedRegex = "besu (\\d+\\.\\d+(\\.\\d+|\\-develop\\-\\p{XDigit}+)|null)";
362364
internalTestSuccess(
363365
this::runtimeConfiguration,
364366
miningParams -> {

0 commit comments

Comments
 (0)