cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cxf git commit: CXF-5855: restructured SSE test cases to stabilize them (attempt #2)
Date Fri, 23 Sep 2016 21:03:42 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 46e7e8bb4 -> 7e2b6f21b


CXF-5855: restructured SSE test cases to stabilize them (attempt #2)


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

Branch: refs/heads/master
Commit: 7e2b6f21b7c9d3e922bf93c31af3c5be896509bb
Parents: 46e7e8b
Author: reta <drreta@gmail.com>
Authored: Fri Sep 23 17:03:26 2016 -0400
Committer: reta <drreta@gmail.com>
Committed: Fri Sep 23 17:03:26 2016 -0400

----------------------------------------------------------------------
 .../jaxrs/sse/AbstractBroadcasterSseTest.java       | 16 ++++++++++++++++
 .../cxf/systest/jaxrs/sse/AbstractSseTest.java      | 15 ---------------
 2 files changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7e2b6f21/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractBroadcasterSseTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractBroadcasterSseTest.java
b/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractBroadcasterSseTest.java
index 4a84acc..d09dbb3 100644
--- a/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractBroadcasterSseTest.java
+++ b/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractBroadcasterSseTest.java
@@ -19,16 +19,21 @@
 package org.apache.cxf.systest.jaxrs.sse;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+
 import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.hasItems;
 
 public abstract class AbstractBroadcasterSseTest extends AbstractSseBaseTest {
     @Test
@@ -61,4 +66,15 @@ public abstract class AbstractBroadcasterSseTest extends AbstractSseBaseTest
{
             r.close();
         }
     }
+    
+    @Test
+    public void testBooksAreReturned() throws JsonProcessingException {
+        Response r = createWebClient("/rest/api/bookstore", MediaType.APPLICATION_JSON).get();
+        assertEquals(Status.OK.getStatusCode(), r.getStatus());
+        
+        final Book[] books = r.readEntity(Book[].class);
+        assertThat(Arrays.asList(books), hasItems(new Book("New Book #1", 1), new Book("New
Book #2", 2)));
+        
+        r.close();
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/7e2b6f21/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractSseTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractSseTest.java
b/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractSseTest.java
index 4c6bbf3..8fca937 100644
--- a/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractSseTest.java
+++ b/systests/rs-sse/src/test/java/org/apache/cxf/systest/jaxrs/sse/AbstractSseTest.java
@@ -18,10 +18,7 @@
  */
 package org.apache.cxf.systest.jaxrs.sse;
 
-import java.util.Arrays;
-
 import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 
@@ -30,7 +27,6 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import org.junit.Test;
 
 import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.hasItems;
 
 public abstract class AbstractSseTest extends AbstractSseBaseTest {
     @Test
@@ -55,15 +51,4 @@ public abstract class AbstractSseTest extends AbstractSseBaseTest {
         
         r.close();
     }
-    
-    @Test
-    public void testBooksAreReturned() throws JsonProcessingException {
-        Response r = createWebClient("/rest/api/bookstore", MediaType.APPLICATION_JSON).get();
-        assertEquals(Status.OK.getStatusCode(), r.getStatus());
-        
-        final Book[] books = r.readEntity(Book[].class);
-        assertThat(Arrays.asList(books), hasItems(new Book("New Book #1", 1), new Book("New
Book #2", 2)));
-        
-        r.close();
-    }
 }


Mime
View raw message