You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2019/09/29 21:54:49 UTC

[jmeter] branch master updated: Fix test failure following ph-css upgrade, on parsing error, see Heavily improved fault tolerance in parsing when browser compliant mode is enabled

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 926f895  Fix test failure following ph-css upgrade, on parsing error, see Heavily improved fault tolerance in parsing when browser compliant mode is enabled
926f895 is described below

commit 926f895bfdc53f60b9d5b3e77ef231ff15d3b1e6
Author: pmouawad <p....@ubik-ingenierie.com>
AuthorDate: Sun Sep 29 23:54:37 2019 +0200

    Fix test failure following ph-css upgrade, on parsing error, see Heavily improved fault tolerance in parsing when browser compliant mode is enabled
---
 .../org/apache/jmeter/protocol/http/parser/TestCssParser.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
index 403154f..17190d4 100644
--- a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
+++ b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
@@ -50,14 +50,14 @@ public class TestCssParser extends JMeterTestCase {
 
     @Test
     public void testGetEmbeddedResourceURLsnOneUrl() throws Exception {
-        List<?> result;
-        result = extractUrls("@import url(http://example.com/abc.css);");
+        List<?> result = extractUrls("@import url(http://example.com/abc.css);");
         assertThat(result.isEmpty(), CoreMatchers.is(false));
     }
 
-    @Test(expected=LinkExtractorParseException.class)
+    @Test
     public void testExtractUrlsFromBrokenData() throws Exception {
-        extractUrls(CSS_IN_ERROR);
+        List<?> result = extractUrls(CSS_IN_ERROR);
+        assertThat(result.isEmpty(), CoreMatchers.is(true));
     }
 
     @Test


Re: [jmeter] branch master updated: Fix test failure following ph-css upgrade, on parsing error, see Heavily improved fault tolerance in parsing when browser compliant mode is enabled

Posted by Vladimir Sitnikov <si...@gmail.com>.
>> +        assertThat(result.isEmpty(), CoreMatchers.is(true));

Philippe, it would be better to use assertThat(result, ...)
Then failure message would include the contents of the "result".

Vladimir

Re: [jmeter] branch master updated: Fix test failure following ph-css upgrade, on parsing error, see Heavily improved fault tolerance in parsing when browser compliant mode is enabled

Posted by Philippe Mouawad <pm...@apache.org>.
Analysis confirmed by library author:

   - https://github.com/phax/ph-css/issues/54


On Mon, Sep 30, 2019 at 9:54 AM Philippe Mouawad <pm...@apache.org>
wrote:

> Hello,
> Just in case you want to double check, this would be the issue IMU
> (related commit is mentioned) that changed behaviour of ph-css:
>
>    - https://github.com/phax/ph-css/issues/41
>
> Regards
>
> On Sun, Sep 29, 2019 at 11:54 PM <pm...@apache.org> wrote:
>
>> 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 926f895  Fix test failure following ph-css upgrade, on parsing
>> error, see Heavily improved fault tolerance in parsing when browser
>> compliant mode is enabled
>> 926f895 is described below
>>
>> commit 926f895bfdc53f60b9d5b3e77ef231ff15d3b1e6
>> Author: pmouawad <p....@ubik-ingenierie.com>
>> AuthorDate: Sun Sep 29 23:54:37 2019 +0200
>>
>>     Fix test failure following ph-css upgrade, on parsing error, see
>> Heavily improved fault tolerance in parsing when browser compliant mode is
>> enabled
>> ---
>>  .../org/apache/jmeter/protocol/http/parser/TestCssParser.java     | 8
>> ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git
>> a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
>> b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
>> index 403154f..17190d4 100644
>> ---
>> a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
>> +++
>> b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
>> @@ -50,14 +50,14 @@ public class TestCssParser extends JMeterTestCase {
>>
>>      @Test
>>      public void testGetEmbeddedResourceURLsnOneUrl() throws Exception {
>> -        List<?> result;
>> -        result = extractUrls("@import url(http://example.com/abc.css)
>> ;");
>> +        List<?> result = extractUrls("@import url(
>> http://example.com/abc.css);");
>>          assertThat(result.isEmpty(), CoreMatchers.is(false));
>>      }
>>
>> -    @Test(expected=LinkExtractorParseException.class)
>> +    @Test
>>      public void testExtractUrlsFromBrokenData() throws Exception {
>> -        extractUrls(CSS_IN_ERROR);
>> +        List<?> result = extractUrls(CSS_IN_ERROR);
>> +        assertThat(result.isEmpty(), CoreMatchers.is(true));
>>      }
>>
>>      @Test
>>
>>

Re: [jmeter] branch master updated: Fix test failure following ph-css upgrade, on parsing error, see Heavily improved fault tolerance in parsing when browser compliant mode is enabled

Posted by Philippe Mouawad <pm...@apache.org>.
Hello,
Just in case you want to double check, this would be the issue IMU (related
commit is mentioned) that changed behaviour of ph-css:

   - https://github.com/phax/ph-css/issues/41

Regards

On Sun, Sep 29, 2019 at 11:54 PM <pm...@apache.org> wrote:

> 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 926f895  Fix test failure following ph-css upgrade, on parsing
> error, see Heavily improved fault tolerance in parsing when browser
> compliant mode is enabled
> 926f895 is described below
>
> commit 926f895bfdc53f60b9d5b3e77ef231ff15d3b1e6
> Author: pmouawad <p....@ubik-ingenierie.com>
> AuthorDate: Sun Sep 29 23:54:37 2019 +0200
>
>     Fix test failure following ph-css upgrade, on parsing error, see
> Heavily improved fault tolerance in parsing when browser compliant mode is
> enabled
> ---
>  .../org/apache/jmeter/protocol/http/parser/TestCssParser.java     | 8
> ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git
> a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
> b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
> index 403154f..17190d4 100644
> ---
> a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
> +++
> b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
> @@ -50,14 +50,14 @@ public class TestCssParser extends JMeterTestCase {
>
>      @Test
>      public void testGetEmbeddedResourceURLsnOneUrl() throws Exception {
> -        List<?> result;
> -        result = extractUrls("@import url(http://example.com/abc.css);");
> +        List<?> result = extractUrls("@import url(
> http://example.com/abc.css);");
>          assertThat(result.isEmpty(), CoreMatchers.is(false));
>      }
>
> -    @Test(expected=LinkExtractorParseException.class)
> +    @Test
>      public void testExtractUrlsFromBrokenData() throws Exception {
> -        extractUrls(CSS_IN_ERROR);
> +        List<?> result = extractUrls(CSS_IN_ERROR);
> +        assertThat(result.isEmpty(), CoreMatchers.is(true));
>      }
>
>      @Test
>
>

Re: [jmeter] branch master updated: Fix test failure following ph-css upgrade, on parsing error, see Heavily improved fault tolerance in parsing when browser compliant mode is enabled

Posted by Philippe Mouawad <pm...@apache.org>.
Hello,
Just in case you want to double check, this would be the issue IMU (related
commit is mentioned) that changed behaviour of ph-css:

   - https://github.com/phax/ph-css/issues/41

Regards

On Sun, Sep 29, 2019 at 11:54 PM <pm...@apache.org> wrote:

> 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 926f895  Fix test failure following ph-css upgrade, on parsing
> error, see Heavily improved fault tolerance in parsing when browser
> compliant mode is enabled
> 926f895 is described below
>
> commit 926f895bfdc53f60b9d5b3e77ef231ff15d3b1e6
> Author: pmouawad <p....@ubik-ingenierie.com>
> AuthorDate: Sun Sep 29 23:54:37 2019 +0200
>
>     Fix test failure following ph-css upgrade, on parsing error, see
> Heavily improved fault tolerance in parsing when browser compliant mode is
> enabled
> ---
>  .../org/apache/jmeter/protocol/http/parser/TestCssParser.java     | 8
> ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git
> a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
> b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
> index 403154f..17190d4 100644
> ---
> a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
> +++
> b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestCssParser.java
> @@ -50,14 +50,14 @@ public class TestCssParser extends JMeterTestCase {
>
>      @Test
>      public void testGetEmbeddedResourceURLsnOneUrl() throws Exception {
> -        List<?> result;
> -        result = extractUrls("@import url(http://example.com/abc.css);");
> +        List<?> result = extractUrls("@import url(
> http://example.com/abc.css);");
>          assertThat(result.isEmpty(), CoreMatchers.is(false));
>      }
>
> -    @Test(expected=LinkExtractorParseException.class)
> +    @Test
>      public void testExtractUrlsFromBrokenData() throws Exception {
> -        extractUrls(CSS_IN_ERROR);
> +        List<?> result = extractUrls(CSS_IN_ERROR);
> +        assertThat(result.isEmpty(), CoreMatchers.is(true));
>      }
>
>      @Test
>
>