You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/10/15 18:53:44 UTC

[cxf] 02/09: Making the RESTLoggingTest more robust

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit cd8d00eddc6cdd73bf3ca74a71d4dc3047ebbf04
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Mon Oct 15 15:23:21 2018 +0100

    Making the RESTLoggingTest more robust
    
    (cherry picked from commit 47b7d6ea1e65e3b55910cc90326cd683a144b43a)
---
 .../java/org/apache/cxf/jaxrs/client/logging/RESTLoggingTest.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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 7c635f9..a6d8019 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
@@ -73,6 +73,8 @@ public class RESTLoggingTest {
         await().until(() -> events.size(), is(8));
         server.stop();
         server.destroy();
+
+        Assert.assertEquals(8, events.size());
         
         // First call with binary logging false
         assertContentLogged(events.get(0));
@@ -98,8 +100,12 @@ public class RESTLoggingTest {
         WebClient client = createClient(SERVICE_URI, loggingFeature);
         String result = client.get(String.class);
         Assert.assertEquals("test1", result);
-        server.destroy();
+
         List<LogEvent> events = sender.getEvents();
+        await().until(() -> events.size(), is(4));
+        server.stop();
+        server.destroy();
+
         Assert.assertEquals(4, events.size());
         checkRequestOut(events.get(0));
         checkRequestIn(events.get(1));