You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Allison, Timothy B." <ta...@mitre.org> on 2017/05/08 13:36:14 UTC

low priority: proxy settings and unit tests?

All,
  Apologies for this one...  Is there an easy way to set proxy information for the unit tests that get an InputStream via URL without changing any source code or project poms?  In Intellij, I can modify the program arguments for each one, but then, of course, maven doesn't pick up that information when I do a build.

  I've been adding @Ignore to the unit tests in my local copy, but there has to be a better way.

Failed tests:
  PDButtonTest.testRadioButtonWithOptions:131 Unexpected IOException Connection refused: connect
  PDButtonTest.testOptionsAndNamesNotNumbers:187 Unexpected IOException Connection refused: connect

Tests in error:
  MergeAcroFormsTest.testAPEntry:92 > Connect Connection refused: connect
  MergeAcroFormsTest.testAnnotsEntry:59 > Connect Connection refused: connect
  MergeAnnotationsTest.testLinkAnnotations:61 > Connect Connection refused: conn...

Re: low priority: proxy settings and unit tests?

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 08.05.2017 um 16:04 schrieb Maruan Sahyoun:
> could you point me to one - I'll adjust 'mine' accordingly.


     public void testPDFBox3379() throws IOException
     {
         InputStream is;
         try
         {
             // don't want to include this font into source download (300KB)
             System.out.println("Downloading DejaVuSansMono font...");
             is = new 
URL("https://issues.apache.org/jira/secure/attachment/12809395/DejaVuSansMono.ttf").openStream();
             System.out.println("Download finished!");
         }
         catch (IOException ex)
         {
             System.err.println("DejaVuSansMono font could not be 
downloaded, test skipped");
             return;
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: low priority: proxy settings and unit tests?

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
could you point me to one - I'll adjust 'mine' accordingly.

Maruan

> Am 08.05.2017 um 16:02 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> Am 08.05.2017 um 15:36 schrieb Allison, Timothy B.:
>> All,
>>   Apologies for this one...  Is there an easy way to set proxy information for the unit tests that get an InputStream via URL without changing any source code or project poms?  In Intellij, I can modify the program arguments for each one, but then, of course, maven doesn't pick up that information when I do a build.
>> 
>>   I've been adding @Ignore to the unit tests in my local copy, but there has to be a better way.
> 
> I have some unit tests that request a connection, but these don't fail if there is no connection.
> 
> Tilman
> 
>> 
>> Failed tests:
>>   PDButtonTest.testRadioButtonWithOptions:131 Unexpected IOException Connection refused: connect
>>   PDButtonTest.testOptionsAndNamesNotNumbers:187 Unexpected IOException Connection refused: connect
>> 
>> Tests in error:
>>   MergeAcroFormsTest.testAPEntry:92 > Connect Connection refused: connect
>>   MergeAcroFormsTest.testAnnotsEntry:59 > Connect Connection refused: connect
>>   MergeAnnotationsTest.testLinkAnnotations:61 > Connect Connection refused: conn...
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: low priority: proxy settings and unit tests?

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 08.05.2017 um 15:36 schrieb Allison, Timothy B.:
> All,
>    Apologies for this one...  Is there an easy way to set proxy information for the unit tests that get an InputStream via URL without changing any source code or project poms?  In Intellij, I can modify the program arguments for each one, but then, of course, maven doesn't pick up that information when I do a build.
>
>    I've been adding @Ignore to the unit tests in my local copy, but there has to be a better way.

I have some unit tests that request a connection, but these don't fail 
if there is no connection.

Tilman

>
> Failed tests:
>    PDButtonTest.testRadioButtonWithOptions:131 Unexpected IOException Connection refused: connect
>    PDButtonTest.testOptionsAndNamesNotNumbers:187 Unexpected IOException Connection refused: connect
>
> Tests in error:
>    MergeAcroFormsTest.testAPEntry:92 > Connect Connection refused: connect
>    MergeAcroFormsTest.testAnnotsEntry:59 > Connect Connection refused: connect
>    MergeAnnotationsTest.testLinkAnnotations:61 > Connect Connection refused: conn...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: low priority: proxy settings and unit tests?

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
fine for me - the tests were added to verify fixes for issues with specific forms attached to the issue. Over time we could also look at reworking that so we generate the test conditions on the fly and not depend on the issues attachments.

BR
Maruan


> Am 08.05.2017 um 15:40 schrieb Allison, Timothy B. <ta...@mitre.org>:
> 
> If there aren't objections, I'll open a ticket and make that change after the 2.0.6 release.  Thank you!
> 
> -----Original Message-----
> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de] 
> Sent: Monday, May 8, 2017 9:39 AM
> To: dev@pdfbox.apache.org
> Subject: Re: low priority: proxy settings and unit tests?
> 
> How about skipping the test on ".. Connection refused .."?
> 
> BR
> Maruan
> 
> 
>> Am 08.05.2017 um 15:36 schrieb Allison, Timothy B. <ta...@mitre.org>:
>> 
>> All,
>> Apologies for this one...  Is there an easy way to set proxy information for the unit tests that get an InputStream via URL without changing any source code or project poms?  In Intellij, I can modify the program arguments for each one, but then, of course, maven doesn't pick up that information when I do a build.
>> 
>> I've been adding @Ignore to the unit tests in my local copy, but there has to be a better way.
>> 
>> Failed tests:
>> PDButtonTest.testRadioButtonWithOptions:131 Unexpected IOException 
>> Connection refused: connect
>> PDButtonTest.testOptionsAndNamesNotNumbers:187 Unexpected IOException 
>> Connection refused: connect
>> 
>> Tests in error:
>> MergeAcroFormsTest.testAPEntry:92 > Connect Connection refused: 
>> connect
>> MergeAcroFormsTest.testAnnotsEntry:59 > Connect Connection refused: 
>> connect
>> MergeAnnotationsTest.testLinkAnnotations:61 > Connect Connection refused: conn...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional commands, e-mail: dev-help@pdfbox.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


RE: low priority: proxy settings and unit tests?

Posted by "Allison, Timothy B." <ta...@mitre.org>.
If there aren't objections, I'll open a ticket and make that change after the 2.0.6 release.  Thank you!

-----Original Message-----
From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de] 
Sent: Monday, May 8, 2017 9:39 AM
To: dev@pdfbox.apache.org
Subject: Re: low priority: proxy settings and unit tests?

How about skipping the test on ".. Connection refused .."?

BR
Maruan


> Am 08.05.2017 um 15:36 schrieb Allison, Timothy B. <ta...@mitre.org>:
> 
> All,
>  Apologies for this one...  Is there an easy way to set proxy information for the unit tests that get an InputStream via URL without changing any source code or project poms?  In Intellij, I can modify the program arguments for each one, but then, of course, maven doesn't pick up that information when I do a build.
> 
>  I've been adding @Ignore to the unit tests in my local copy, but there has to be a better way.
> 
> Failed tests:
>  PDButtonTest.testRadioButtonWithOptions:131 Unexpected IOException 
> Connection refused: connect
>  PDButtonTest.testOptionsAndNamesNotNumbers:187 Unexpected IOException 
> Connection refused: connect
> 
> Tests in error:
>  MergeAcroFormsTest.testAPEntry:92 > Connect Connection refused: 
> connect
>  MergeAcroFormsTest.testAnnotsEntry:59 > Connect Connection refused: 
> connect
>  MergeAnnotationsTest.testLinkAnnotations:61 > Connect Connection refused: conn...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional commands, e-mail: dev-help@pdfbox.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: low priority: proxy settings and unit tests?

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
How about skipping the test on ".. Connection refused .."?

BR
Maruan


> Am 08.05.2017 um 15:36 schrieb Allison, Timothy B. <ta...@mitre.org>:
> 
> All,
>  Apologies for this one...  Is there an easy way to set proxy information for the unit tests that get an InputStream via URL without changing any source code or project poms?  In Intellij, I can modify the program arguments for each one, but then, of course, maven doesn't pick up that information when I do a build.
> 
>  I've been adding @Ignore to the unit tests in my local copy, but there has to be a better way.
> 
> Failed tests:
>  PDButtonTest.testRadioButtonWithOptions:131 Unexpected IOException Connection refused: connect
>  PDButtonTest.testOptionsAndNamesNotNumbers:187 Unexpected IOException Connection refused: connect
> 
> Tests in error:
>  MergeAcroFormsTest.testAPEntry:92 > Connect Connection refused: connect
>  MergeAcroFormsTest.testAnnotsEntry:59 > Connect Connection refused: connect
>  MergeAnnotationsTest.testLinkAnnotations:61 > Connect Connection refused: conn...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org