Skip to content

[CXF-9062]Be able to create AsyncHTTPConduit based on URLConnectionHT…#2093

Merged
ffang merged 2 commits intoapache:mainfrom
ffang:CXF-9062
Oct 8, 2024
Merged

[CXF-9062]Be able to create AsyncHTTPConduit based on URLConnectionHT…#2093
ffang merged 2 commits intoapache:mainfrom
ffang:CXF-9062

Conversation

@ffang
Copy link
Contributor

@ffang ffang commented Oct 4, 2024

…TPConduit

@reta
Copy link
Member

reta commented Oct 7, 2024

@ffang looks good, thank you. It would be great to have tests that use conduit with forceURLConnectionConduit property set (I believe the default is false and none of the tests actually verify this conduit works).

@ffang
Copy link
Contributor Author

ffang commented Oct 8, 2024

@ffang looks good, thank you. It would be great to have tests that use conduit with forceURLConnectionConduit property set (I believe the default is false and none of the tests actually verify this conduit works).

Hi @reta ,

This is a good question, actually I have run all tests with forceURLConnectionConduit set as true. And that's why I changed DigestAuthTest.java and AbstractApacheClientServerHttp2Test.java. With that change, they pass with both forceURLConnectionConduit as true or false.

Cheers
Freeman

@reta
Copy link
Member

reta commented Oct 8, 2024

This is a good question, actually I have run all tests with forceURLConnectionConduit set as true.

Thanks @ffang , I suspect you have done it ad-hoc / manually, right? What we should be able to do is something like that:

<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>forceURLConnection-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <systemPropertyVariables>
                                <org.apache.cxf.transport.http.forceURLConnection>true</org.apache.cxf.transport.http.forceURLConnection>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <systemPropertyVariables>
                                <org.apache.cxf.transport.http.forceURLConnection>false</org.apache.cxf.transport.http.forceURLConnection>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Basically, for modules in question (xxx-hc, xxx-hc5) we would have 2 test runs, w/o system property set (I am happy to help with that as well). Thanks!

@ffang
Copy link
Contributor Author

ffang commented Oct 8, 2024

This is a good question, actually I have run all tests with forceURLConnectionConduit set as true.

Thanks @ffang , I suspect you have done it ad-hoc / manually, right? What we should be able to do is something like that:

That's right, I did it manually.

<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>forceURLConnection-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <systemPropertyVariables>
                                <org.apache.cxf.transport.http.forceURLConnection>true</org.apache.cxf.transport.http.forceURLConnection>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <systemPropertyVariables>
                                <org.apache.cxf.transport.http.forceURLConnection>false</org.apache.cxf.transport.http.forceURLConnection>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Basically, for modules in question (xxx-hc, xxx-hc5) we would have 2 test runs, w/o system property set (I am happy to help with that as well). Thanks!

Thanks for any help you provide. I'm gonna merge this PR for now.

Cheers
Freeman

@ffang ffang merged commit d3da696 into apache:main Oct 8, 2024
reta pushed a commit that referenced this pull request Oct 10, 2024
#2093)

* [CXF-9062]Be able to create AsyncHTTPConduit based on URLConnectionHTTPConduit

* [CXF-9062]address feedback

(cherry picked from commit d3da696)
reta pushed a commit that referenced this pull request Oct 10, 2024
#2093)

* [CXF-9062]Be able to create AsyncHTTPConduit based on URLConnectionHTTPConduit

* [CXF-9062]address feedback

(cherry picked from commit d3da696)
(cherry picked from commit 2561dfc)
ppalaga pushed a commit to ppalaga/cxf that referenced this pull request Nov 12, 2024
apache#2093)

* [CXF-9062]Be able to create AsyncHTTPConduit based on URLConnectionHTTPConduit

* [CXF-9062]address feedback

(cherry picked from commit d3da696)
(cherry picked from commit 2561dfc)
cesarhernandezgt pushed a commit to cesarhernandezgt/cxf that referenced this pull request Jan 29, 2025
apache#2093)

* [CXF-9062]Be able to create AsyncHTTPConduit based on URLConnectionHTTPConduit

* [CXF-9062]address feedback

(cherry picked from commit d3da696)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments