Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoboy- committed May 13, 2022
1 parent 09448df commit 0c8810c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public void clusters() throws Exception {
ClusterData.builder().serviceUrl("http://new-broker.messaging.use.example.com:8080").build());

try {
asynRequests(ctx -> clusters.getNamespaceIsolationPolicies(ctx, "use"));
asyncRequests(ctx -> clusters.getNamespaceIsolationPolicies(ctx, "use"));
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), 404);
Expand All @@ -255,7 +255,7 @@ public void clusters() throws Exception {
.build();
AsyncResponse response = mock(AsyncResponse.class);
clusters.setNamespaceIsolationPolicy(response,"use", "policy1", policyData);
asynRequests(ctx -> clusters.getNamespaceIsolationPolicies(ctx, "use"));
asyncRequests(ctx -> clusters.getNamespaceIsolationPolicies(ctx, "use"));

try {
asyncRequests(ctx -> clusters.deleteCluster(ctx, "use"));
Expand All @@ -265,7 +265,7 @@ public void clusters() throws Exception {
}

clusters.deleteNamespaceIsolationPolicy("use", "policy1");
assertTrue(((Map<String, NamespaceIsolationDataImpl>) asynRequests(ctx ->
assertTrue(((Map<String, NamespaceIsolationDataImpl>) asyncRequests(ctx ->
clusters.getNamespaceIsolationPolicies(ctx, "use"))).isEmpty());

asyncRequests(ctx -> clusters.deleteCluster(ctx, "use"));
Expand All @@ -286,7 +286,7 @@ public void clusters() throws Exception {
}

try {
asynRequests(ctx -> clusters.getNamespaceIsolationPolicies(ctx, "use"));
asyncRequests(ctx -> clusters.getNamespaceIsolationPolicies(ctx, "use"));
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), 404);
Expand Down

0 comments on commit 0c8810c

Please sign in to comment.