Bug 60435 - Cant specify proxy when running 'ant test'
Summary: Cant specify proxy when running 'ant test'
Status: RESOLVED DUPLICATE of bug 60886
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-30 23:18 UTC by Cheyne
Modified: 2017-09-02 19:40 UTC (History)
1 user (show)



Attachments
Attached is a patch to build.xml to use the http(s) proxy settings if specified when running the tests. (4.91 KB, patch)
2016-11-30 23:18 UTC, Cheyne
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cheyne 2016-11-30 23:18:22 UTC
Created attachment 34492 [details]
Attached is a patch to build.xml to use the http(s) proxy settings if specified when running the tests.

I was looking to build JMeter locally from source behind a corporate proxy.

After I set a proxy I could run 'ant download_jars'
set ANT_OPTS=-Dhttps.proxyHost=<interal-proxy> -Dhttps.proxyPort=3128 -Dhttp.proxyHost=<interal-proxy> -Dhttp.proxyPort=3128

But 'ant test' would not run properly due to the following types of error:

C:\jmeter\build.xml:2626: CSV Files are not identical.
        C:\jmeter\bin\testfiles\Bug52310.csv
        ComputeIPAddr,200,OK,TG2 1-1,text,true
HTTP-Request-HC31,200,OK,TG2 1-1,text,true
HTTP-Request-HC4,200,OK,TG2 1-1,text,true

        C:\jmeter\bin\Bug52310.csv
        ComputeIPAddr,200,OK,TG2 1-1,text,true
HTTP-Request-HC31,Non HTTP response code: java.net.ConnectException,Non HTTP response message: Connection timed out:
 connect,TG2 1-1,text,false
HTTP-Request-HC4,Non HTTP response code: java.net.ConnectException,Non HTTP response message: Connection timed out:
connect,TG2 1-1,text,false
Comment 1 Felix Schumacher 2016-12-01 20:11:36 UTC
Thanks for your contribution.

A few notes to the patch. There seem to be a lot of white space change, that makes it harder to see the differences. The patch uses features from ant 1.9.x, but for the moment we have to use ant 1.8.x as that is the newest version available on travis-ci.
Comment 2 Cheyne 2016-12-01 20:51:08 UTC
I noticed  <property name="ant.version.required" value="1.9.1" /> in the build script which is what I based the changes off.

I'm not too fussed when this goes in, it can be parked until a later version of ant is available on travis-ci, as I can patch it locally for my build.
Comment 3 Michael Osipov 2017-03-17 21:26:09 UTC
I reported a similar issue today: Bug 60886

First of all, the proposed patch does not guarantee that HttpClient will pickup these properties because it is not URLConnection. Second, it still won't help because the DNS resolver tests use Google's 8.8.8.8 DNS server which requires UDP/outbound. This won't be handled by any HTTP proxy because it is TCP.
Comment 4 Michael Osipov 2017-03-17 21:31:00 UTC
(In reply to Michael Osipov from comment #3)
> I reported a similar issue today: Bug 60886
> 
> First of all, the proposed patch does not guarantee that HttpClient will
> pickup these properties because it is not URLConnection. Second, it still
> won't help because the DNS resolver tests use Google's 8.8.8.8 DNS server
> which requires UDP/outbound. This won't be handled by any HTTP proxy because
> it is TCP.

I must correct myself, a SOCKS5 proxy supports UDP as per definition, but I highly doubt that one can hook that upto the DNS tests.
Comment 5 Philippe Mouawad 2017-09-02 19:40:19 UTC

*** This bug has been marked as a duplicate of bug 60886 ***