jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject [jmeter] branch master updated: Modify 2 tests to test custom port setting
Date Mon, 23 Sep 2019 12:12:15 GMT
This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a7df17  Modify 2 tests to test custom port setting
3a7df17 is described below

commit 3a7df1737ac2c433327bd611cc081a4e9402346a
Author: pmouawad <p.mouawad@ubik-ingenierie.com>
AuthorDate: Mon Sep 23 14:11:56 2019 +0200

    Modify 2 tests to test custom port setting
---
 .../java/org/apache/jmeter/gui/action/ParseCurlCommandActionTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/protocol/http/src/test/java/org/apache/jmeter/gui/action/ParseCurlCommandActionTest.java
b/src/protocol/http/src/test/java/org/apache/jmeter/gui/action/ParseCurlCommandActionTest.java
index f783f06..0c912b0 100644
--- a/src/protocol/http/src/test/java/org/apache/jmeter/gui/action/ParseCurlCommandActionTest.java
+++ b/src/protocol/http/src/test/java/org/apache/jmeter/gui/action/ParseCurlCommandActionTest.java
@@ -205,7 +205,7 @@ public class ParseCurlCommandActionTest {
         // test proxy in httpsampler
         ParseCurlCommandAction p = new ParseCurlCommandAction();
         BasicCurlParser basicCurlParser = new BasicCurlParser();
-        Request request = basicCurlParser.parse("curl 'http://jmeter.apache.org/' -x 'https://aa:bb@example.com:8042'");
+        Request request = basicCurlParser.parse("curl 'http://jmeter.apache.org:8443/' -x
'https://aa:bb@example.com:8042'");
         Class<ParseCurlCommandAction> parseCurlCommandAction = ParseCurlCommandAction.class;
         Class[] classes = new Class[] { Request.class, String.class };
         Method method = parseCurlCommandAction.getDeclaredMethod("createSampler", classes);
@@ -217,6 +217,7 @@ public class ParseCurlCommandActionTest {
         assertTrue("The command line should be parsed in turn", httpSampler.getProxyPortInt()
== 8042);
         assertEquals("path should be set in httpsampler", httpSampler.getPath(), "/");
         assertEquals("domain should be set in httpsampler", "jmeter.apache.org", httpSampler.getDomain());
+        assertEquals("port should be set in httpsampler", 8443, httpSampler.getPort());
         assertEquals("method should be set in httpsampler", "GET", httpSampler.getMethod());
 
         // test post data in httpsampler
@@ -309,6 +310,7 @@ public class ParseCurlCommandActionTest {
         HTTPSamplerProxy httpSampler = (HTTPSamplerProxy) method.invoke(p, objs);
         assertEquals("path should be set in httpsampler", httpSampler.getPath(), "/");
         assertEquals("domain should be set in httpsampler", "jmeter.apache.org", httpSampler.getDomain());
+        assertEquals("port should be 80 in httpsampler", 80, httpSampler.getPort());
         assertEquals("method should be set in httpsampler", "GET", httpSampler.getMethod());
     }
 


Mime
View raw message