From b3716740cca6874876e54cbff5e16ec777e2a1a8 Mon Sep 17 00:00:00 2001 From: Guus der Kinderen Date: Wed, 19 Jul 2023 15:56:11 +0200 Subject: [PATCH] OF-2611: S2S unit test should print configuration Not all test-runners easily identify the parameters that are used to run each test iteration. Those that do not, typically show a number. By outputting the numbered arguments, they can be cross-referenced with any failed test case. --- .../openfire/session/LocalIncomingServerSessionTest.java | 7 +++++++ .../openfire/session/LocalOutgoingServerSessionTest.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/xmppserver/src/test/java/org/jivesoftware/openfire/session/LocalIncomingServerSessionTest.java b/xmppserver/src/test/java/org/jivesoftware/openfire/session/LocalIncomingServerSessionTest.java index 6a8f698d37..4c1551cfe8 100644 --- a/xmppserver/src/test/java/org/jivesoftware/openfire/session/LocalIncomingServerSessionTest.java +++ b/xmppserver/src/test/java/org/jivesoftware/openfire/session/LocalIncomingServerSessionTest.java @@ -327,6 +327,13 @@ private static Iterable arguments() { } } + // Not all test-runners easily identify the parameters that are used to run each test iteration. Those that do + // not, typically show a number. By outputting the numbered arguments, they can be cross-referenced with any + // failed test case. + int i = 1; + for (Arguments arguments : result) { + System.out.println("Test [" + i++ + "]: " + arguments.get()[0] + ", " + arguments.get()[1]); + } return result; } } diff --git a/xmppserver/src/test/java/org/jivesoftware/openfire/session/LocalOutgoingServerSessionTest.java b/xmppserver/src/test/java/org/jivesoftware/openfire/session/LocalOutgoingServerSessionTest.java index 41cfbfe13d..4ec431c163 100644 --- a/xmppserver/src/test/java/org/jivesoftware/openfire/session/LocalOutgoingServerSessionTest.java +++ b/xmppserver/src/test/java/org/jivesoftware/openfire/session/LocalOutgoingServerSessionTest.java @@ -307,6 +307,13 @@ private static Iterable arguments() { } } + // Not all test-runners easily identify the parameters that are used to run each test iteration. Those that do + // not, typically show a number. By outputting the numbered arguments, they can be cross-referenced with any + // failed test case. + int i = 1; + for (Arguments arguments : result) { + System.out.println("Test [" + i++ + "]: " + arguments.get()[0] + ", " + arguments.get()[1]); + } return result; } }