Skip to content

Commit c08613a

Browse files
committed
fix: ut type assertion
1 parent a8116b0 commit c08613a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

arex-instrumentation/httpclient/arex-httpclient-apache-v4/src/test/java/io/arex/inst/httpclient/apache/async/BasicFutureInstrumentationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static org.junit.jupiter.api.Assertions.*;
44

5+
import io.arex.inst.httpclient.apache.common.ArexBufferedHttpEntity;
56
import io.arex.inst.runtime.context.ContextManager;
67
import java.io.IOException;
78
import net.bytebuddy.description.method.MethodDescription;
@@ -54,7 +55,7 @@ void testFutureAdvice() throws IOException {
5455
((FutureCallbackWrapper<?>) wrapper).setNeedRecord(true);
5556
BasicFutureInstrumentation.FutureAdvice.completed(httpResponse, wrapper);
5657

57-
assertInstanceOf(BufferedHttpEntity.class, httpResponse.getEntity());
58+
assertInstanceOf(ArexBufferedHttpEntity.class, httpResponse.getEntity());
5859

5960
BasicFutureInstrumentation.FutureAdvice.completed(httpResponse, null);
6061
}

arex-instrumentation/httpclient/arex-httpclient-apache-v4/src/test/java/io/arex/inst/httpclient/apache/async/RequestProducerInstrumentationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import static org.mockito.Mockito.mockStatic;
55

66
import io.arex.inst.httpclient.apache.async.RequestProducerInstrumentation.ConstructorAdvice;
7+
import io.arex.inst.httpclient.apache.common.ArexBufferedHttpEntity;
78
import io.arex.inst.runtime.context.ContextManager;
89
import java.lang.reflect.Constructor;
910
import net.bytebuddy.description.method.MethodDescription.ForLoadedConstructor;
@@ -58,7 +59,7 @@ void onEnter() {
5859
HttpPost request = new HttpPost();
5960
request.setEntity(new ByteArrayEntity("test".getBytes()));
6061
ConstructorAdvice.onEnter(request);
61-
assertInstanceOf(BufferedHttpEntity.class, request.getEntity());
62+
assertInstanceOf(ArexBufferedHttpEntity.class, request.getEntity());
6263
}
6364
}
6465
}

0 commit comments

Comments
 (0)