diff options
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/process/TestProcessFactory.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/process/TestProcessFactory.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/process/TestProcessFactory.java index 29f1ffef6f2..c87d3875d25 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/process/TestProcessFactory.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/process/TestProcessFactory.java @@ -63,7 +63,9 @@ public class TestProcessFactory implements ProcessFactory { int missingCommandIndex = spawnCommandLines.size(); throw new IllegalStateException("Command #" + missingCommandIndex + " never executed: " + - expectedSpawnCalls.get(missingCommandIndex).commandDescription); + expectedSpawnCalls.get(missingCommandIndex).commandDescription + + "\nExpected commands:\n" + getExpectedCommandLines() + + "\nActual commands:\n" + spawnCommandLines); } } @@ -101,4 +103,11 @@ public class TestProcessFactory implements ProcessFactory { return toReturn; } + + private List<String> getExpectedCommandLines() { + return expectedSpawnCalls.stream() + .map(spawnCall -> spawnCall.commandDescription) + .toList(); + } + } |