Rework test to try and see why it's randomly failing # Conflicts: # rt/features/logging/src/test/java/org/apache/cxf/ext/logging/RESTLoggingTest.java
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/66b9f877 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/66b9f877 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/66b9f877 Branch: refs/heads/3.1.x-fixes Commit: 66b9f877271669b0fb5bc3328effaf2013b93667 Parents: eb9f16e Author: Daniel Kulp <[email protected]> Authored: Mon Feb 27 13:35:35 2017 -0500 Committer: Daniel Kulp <[email protected]> Committed: Tue Mar 7 14:01:20 2017 -0500 ---------------------------------------------------------------------- .../apache/cxf/ext/logging/RESTLoggingTest.java | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/66b9f877/rt/features/logging/src/test/java/org/apache/cxf/ext/logging/RESTLoggingTest.java ---------------------------------------------------------------------- diff --git a/rt/features/logging/src/test/java/org/apache/cxf/ext/logging/RESTLoggingTest.java b/rt/features/logging/src/test/java/org/apache/cxf/ext/logging/RESTLoggingTest.java index 8bde31f..35c47e0 100644 --- a/rt/features/logging/src/test/java/org/apache/cxf/ext/logging/RESTLoggingTest.java +++ b/rt/features/logging/src/test/java/org/apache/cxf/ext/logging/RESTLoggingTest.java @@ -61,16 +61,18 @@ public class RESTLoggingTest { loggingFeature.setLogBinary(true); client.get(InputStream.class).close(); server.destroy(); - - assertLogged(sender.getEvents().get(0)); - assertLogged(sender.getEvents().get(1)); - assertNotLogged(sender.getEvents().get(2)); - assertNotLogged(sender.getEvents().get(3)); - - assertLogged(sender.getEvents().get(4)); - assertLogged(sender.getEvents().get(5)); - assertLogged(sender.getEvents().get(6)); - assertLogged(sender.getEvents().get(7)); + + List<LogEvent> events = sender.getEvents(); + Assert.assertEquals(8, events.size()); + assertLogged(events.get(0)); + assertLogged(events.get(1)); + assertNotLogged(events.get(2)); + assertNotLogged(events.get(3)); + + assertLogged(events.get(4)); + assertLogged(events.get(5)); + assertLogged(events.get(6)); + assertLogged(events.get(7)); } private void assertLogged(LogEvent event) {
