You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/02/27 19:05:24 UTC

[5/6] cxf git commit: Rework test to try and see why it's randomly failing

Rework test to try and see why it's randomly failing


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/177579ca
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/177579ca
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/177579ca

Branch: refs/heads/master
Commit: 177579cad9c1a41b9b7c68ad69ed84de9fa08561
Parents: d017d3c
Author: Daniel Kulp <dk...@apache.org>
Authored: Mon Feb 27 13:35:35 2017 -0500
Committer: Daniel Kulp <dk...@apache.org>
Committed: Mon Feb 27 14:05:08 2017 -0500

----------------------------------------------------------------------
 .../jaxrs/client/logging/RESTLoggingTest.java   | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/177579ca/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/logging/RESTLoggingTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/logging/RESTLoggingTest.java b/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/logging/RESTLoggingTest.java
index 08527c8..980a744 100644
--- a/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/logging/RESTLoggingTest.java
+++ b/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/logging/RESTLoggingTest.java
@@ -66,15 +66,17 @@ public class RESTLoggingTest {
         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) {