This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-net.git
commit 4c13fd4dad04a2d07f17119109fdcb0861db1e1c Author: Gary Gregory <[email protected]> AuthorDate: Wed Jul 19 10:11:55 2023 -0400 Better test failure message --- src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java b/src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java index 0adeb738..76cce667 100644 --- a/src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java +++ b/src/test/java/org/apache/commons/net/tftp/TFTPServerPathTest.java @@ -56,8 +56,8 @@ public class TFTPServerPathTest { final File out = new File(serverDirectory, filePrefix + "out"); // cleanup old failed runs - out.delete(); - assertFalse(out.exists(), "Couldn't clear output location"); + final boolean deleted = out.delete(); + assertFalse(out.exists(), () -> "Couldn't clear output location, deleted=" + deleted); try (final FileOutputStream output = new FileOutputStream(out)) { tftp.receiveFile(file.getName(), TFTP.BINARY_MODE, output, "localhost", SERVER_PORT); @@ -96,8 +96,8 @@ public class TFTPServerPathTest { final File out = new File(serverDirectory, filePrefix + "out"); // cleanup old failed runs - out.delete(); - assertFalse(out.exists(), "Couldn't clear output location"); + final boolean deleted = out.delete(); + assertFalse(out.exists(), () -> "Couldn't clear output location, deleted=" + deleted); try (final FileOutputStream output = new FileOutputStream(out)) { tftp.receiveFile(file.getName(), TFTP.BINARY_MODE, output, "localhost", SERVER_PORT);
