[ 
https://issues.apache.org/jira/browse/PDFBOX-5017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17236646#comment-17236646
 ] 

Tilman Hausherr edited comment on PDFBOX-5017 at 11/21/20, 11:40 AM:
---------------------------------------------------------------------

Wow thanks, this really works. I added some numbers and it uses exactly the 
number of CPU cores I have. And one can also change the number of cores used if 
needed
{code}
junit.jupiter.execution.parallel.config.strategy = fixed
junit.jupiter.execution.parallel.config.fixed.parallelism = 5
{code}
Will you change TestPDFToImage or should I?

edit: it also works with "@MethodSource("data")".
{code}
    public static Collection<Arguments> data()
    {
        Integer[] ints = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
13, 14, 15, 16, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34};
        
        return Stream.of(ints).map(i -> 
Arguments.of(i)).collect(Collectors.toList());
    }
{code}


was (Author: tilman):
Wow thanks, this really works. I added some numbers and it uses exactly the 
number of CPU cores I have. And one can also change the number of cores used if 
needed
{code}
junit.jupiter.execution.parallel.config.strategy = fixed
junit.jupiter.execution.parallel.config.fixed.parallelism = 5
{code}
Will you change TestPDFToImage or should I?

edit: it also works with "@MethodSource".
{code}
    public static Collection<Arguments> data()
    {
        Integer[] ints = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
13, 14, 15, 16, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34};
        
        return Stream.of(ints).map(i -> 
Arguments.of(i)).collect(Collectors.toList());
    }
{code}

> Switch trunk from junit4 to junit5
> ----------------------------------
>
>                 Key: PDFBOX-5017
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5017
>             Project: PDFBox
>          Issue Type: Test
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 3.0.0 PDFBox
>
>         Attachments: junit5-parallel.zip
>
>
> The current trunk version has an issue with a vulnerability in the latest 
> version 4.13.1 of the junit plugin. Switching to junit5 solves this and it 
> seems to be a good idea at all.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to