Skip to content

Commit

Permalink
Fixed tests to disabling thrown of FailingHttpStatusCode exception
Browse files Browse the repository at this point in the history
  • Loading branch information
breakponchito authored and manovotn committed Jul 19, 2022
1 parent 7310745 commit 5393d67
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void testApplicationContextActiveOnTimeout() throws Exception {
@SpecAssertion(section = APPLICATION_CONTEXT_EE, id = "ae")
public void testApplicationContextActiveOnError() throws Exception {
WebClient webClient = new WebClient();
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
webClient.getPage(getPath(AsyncServlet.TEST_ERROR));
TextPage results = webClient.getPage(contextPath + "Status");
assertTrue(results.getContent().contains("onError: true"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static WebArchive createTestArchive() {
public void testConversationDetermination() throws Exception {

WebClient webClient = new WebClient();
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);

// Begin long-running conversation
TextPage cidPage = webClient.getPage(contextPath + "foo?action=begin");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public void testRequestContextActiveOnTimeout() throws Exception {
@SpecAssertion(section = REQUEST_CONTEXT_EE, id = "ad")
public void testRequestContextActiveOnError() throws Exception {
WebClient webClient = new WebClient();
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
webClient.getPage(getPath(AsyncServlet.TEST_ERROR));
TextPage results = webClient.getPage(contextPath + "Status");
assertTrue(results.getContent().contains("onError: true"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public void testSessionContextActiveOnTimeout() throws Exception {
@SpecAssertions({ @SpecAssertion(section = SESSION_CONTEXT_EE, id = "ad") })
public void testSessionContextActiveOnError() throws Exception {
WebClient webClient = new WebClient();
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
webClient.getPage(getPath(AsyncServlet.TEST_ERROR));
TextPage results = webClient.getPage(contextPath + "Status");
assertTrue(results.getContent().contains("onError: true"));
Expand Down

0 comments on commit 5393d67

Please sign in to comment.