diff options
author | dglFromAtt <dgl@research.att.com> | 2018-03-13 20:55:20 -0400 |
---|---|---|
committer | dglFromAtt <dgl@research.att.com> | 2018-03-13 20:57:09 -0400 |
commit | 7c8acea9aba9500788077fc3850ce32117ae4ff7 (patch) | |
tree | 5396abcf6ce27157ea8e1a765b7820dd895d9074 /src/test | |
parent | db082655908e57709511312665fe81a4da5cfe0c (diff) |
Correct unit test ordering dependency
Change-Id: I8d9a10854756ea04d5ba06251123510c0578f03b
Signed-off-by: dglFromAtt <dgl@research.att.com>
Issue-ID: DMAAP-331
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResourceTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResourceTest.java b/src/test/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResourceTest.java index 7a57794..4d4c731 100644 --- a/src/test/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResourceTest.java +++ b/src/test/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResourceTest.java @@ -64,7 +64,7 @@ public class MR_ClusterResourceTest extends JerseyTest { @Test public void GetTest() { Response resp = target( "mr_clusters").request().get( Response.class ); - System.out.println( "GET feed resp=" + resp.getStatus() ); + System.out.println( "GET MR_Cluster resp=" + resp.getStatus() ); assertTrue( resp.getStatus() == 200 ); } @@ -107,7 +107,7 @@ public class MR_ClusterResourceTest extends JerseyTest { // first, add it System.out.println( "POST MR_Cluster resp=" + resp.getStatus() + " " + resp.readEntity( String.class ) ); if( resp.getStatus() != 409 ) { - assertTrue( resp.getStatus() == 200 ); + assertTrue( resp.getStatus() >= 200 && resp.getStatus() < 300 ); } // now change a field @@ -116,11 +116,11 @@ public class MR_ClusterResourceTest extends JerseyTest { // update with incorrect key resp = target( "mr_clusters") - .path( cluster.getDcaeLocationName()) + .path( "invalidLocationNam" ) .request() .put( reqEntity, Response.class ); System.out.println( "PUT MR_Cluster resp=" + resp.getStatus() + " " + resp.readEntity(String.class)); - assertTrue( resp.getStatus() == 200 ); + assertTrue( resp.getStatus() == 404 ); // update with correct key resp = target( "mr_clusters") @@ -128,7 +128,7 @@ public class MR_ClusterResourceTest extends JerseyTest { .request() .put( reqEntity, Response.class ); System.out.println( "PUT MR_Cluster resp=" + resp.getStatus() + " " + resp.readEntity(String.class)); - assertTrue( resp.getStatus() == 200 ); + assertTrue( resp.getStatus() >= 200 && resp.getStatus() < 300 ); } @Test |