You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/01/11 23:01:00 UTC

[jira] [Commented] (GEODE-9942) Stress test tasks neglect non-public JUnit 5 test classes

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

ASF subversion and git services commented on GEODE-9942:
--------------------------------------------------------

Commit b2417ca82b096beeb174e536edd29c37f360f8fd in geode's branch refs/heads/develop from Dale Emery
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=b2417ca ]

GEODE-9942: Include JUnit 5 tests in stress tests (#7256)

PROBLEM

JUnit 5 test classes need not be public. Indeed, IntelliJ's default
inspections discourage making JUnit 5 classes public.

`StressTestHelper` uses a `ClassGraph` to gather information about test
classes. By default, the `ClassGraph` scans only public classes. So by
default, the `ClassGraph` does not gather information about JUnit 5
classes with non-public visibility.

As a result, our stress test scripts do not run JUnit 5 tests.

SOLUTION

Call `ignoreClassVisibility()` to configure the `ClassGraph` to scan all
classes, not just public ones.

A few poorly-controlled, unsophisticated experiments (on a 2016 MacBook)
show that this increases the scan duration from 3 seconds to 3.4
seconds.

> Stress test tasks neglect non-public JUnit 5 test classes
> ---------------------------------------------------------
>
>                 Key: GEODE-9942
>                 URL: https://issues.apache.org/jira/browse/GEODE-9942
>             Project: Geode
>          Issue Type: Test
>          Components: tests
>    Affects Versions: 1.15.0
>            Reporter: Dale Emery
>            Assignee: Dale Emery
>            Priority: Major
>              Labels: GeodeOperationAPI, pull-request-available
>
> JUnit 5 test classes need not be public. Indeed, IntelliJ's default inspections discourage making JUnit 5 classes public.
> {{StressTestHelper}} uses a {{ClassGraph}} to gather information about test classes. By default, {{ClassGraph}} scans only public classes. So by default, {{ClassGraph}} does not gather information about JUnit 5 classes with non-public visibility. As a result, our stress test scripts do not run JUnit 5 tests.
> Solution: Call {{ignoreClassVisibility()}} to configure {{ClassGraph}} to scan all classes, not just public ones.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)