Skip to content

Commit 2653f67

Browse files
authored
[Fix][Connectors-v2] Fix UT for connector-http (#9821)
1 parent ad5278c commit 2653f67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

seatunnel-connectors-v2/connector-http/connector-http-base/src/test/java/org/apache/seatunnel/connectors/seatunnel/http/HttpSourceReaderInternalPollNextTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ public void testPageNumberPlaceHolderRequestBodyUpdate() throws Exception {
121121
httpSourceReader =
122122
new HttpSourceReader(
123123
httpParameter, context, deserializationSchema, jsonField, null, pageInfo);
124+
// This creates a real HTTP client. For testing purposes, we need to replace it with a mock.
124125
httpSourceReader.open();
125-
126+
httpSourceReader.setHttpClient(httpClientProvider);
126127
httpSourceReader.internalPollNext(collector);
127128

128129
// Verify the body was updated correctly

0 commit comments

Comments
 (0)