Skip to content

Commit

Permalink
impr
Browse files Browse the repository at this point in the history
  • Loading branch information
eze210 committed Dec 19, 2024
1 parent cd54320 commit b66a4bd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
*/
package org.mule.test.http.functional.listener;

import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import static org.mule.runtime.http.api.HttpHeaders.Names.CONNECTION;
import static org.mule.runtime.http.api.HttpHeaders.Values.KEEP_ALIVE;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.emptyOrNullString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;

import org.mule.runtime.core.api.util.StringUtils;
import org.mule.tck.junit4.rule.DynamicPort;
import org.mule.test.http.functional.AbstractHttpTestCase;
Expand Down Expand Up @@ -122,7 +126,11 @@ private HttpResponse doPerformRequest(int port, HttpVersion httpVersion, boolean
}

private void assertResponse(String response, boolean shouldBeValid) {
assertThat(StringUtils.isEmpty(response), is(!shouldBeValid));
if (shouldBeValid) {
assertThat(response, not(emptyOrNullString()));
} else {
assertThat(response, emptyOrNullString());
}
}

private void sendRequest(Socket socket, HttpVersion httpVersion) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

<Loggers>

<AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="DEBUG" />
<AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="INFO" />
<AsyncLogger name="org.mule.service.http.netty.impl.client" level="DEBUG" />

<AsyncLogger name="org.mule.runtime.core.internal.processor.LoggerMessageProcessor" level="INFO"/>
<AsyncLogger name="com.mulesoft.agent" level="INFO"/>
Expand Down
2 changes: 1 addition & 1 deletion mule-http-connector/src/test/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<AsyncLogger name="org.mule" level="WARN"/>
<AsyncLogger name="com.mulesoft" level="WARN"/>

<AsyncLogger name="org.mule.service.http" level="WARN"/>
<AsyncLogger name="org.mule.service.http" level="DEBUG"/>
<AsyncLogger name="org.mule.extension.http" level="WARN"/>

<AsyncRoot level="INFO">
Expand Down

0 comments on commit b66a4bd

Please sign in to comment.