Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate JUnit Platform Gradle Plugin #1317

Closed
6 tasks done
marcphilipp opened this issue Mar 2, 2018 · 1 comment
Closed
6 tasks done

Deprecate JUnit Platform Gradle Plugin #1317

marcphilipp opened this issue Mar 2, 2018 · 1 comment

Comments

@marcphilipp
Copy link
Member

marcphilipp commented Mar 2, 2018

Now that Gradle 4.6 has been released and provides native support for running tests on the JUnit Platform, we can go ahead and deprecate our custom plugin.

Deliverables

  • Emit deprecation warning when junitPlatform task is executed
  • Deprecate all code in junit-platform-gradle-plugin subproject
  • Add note to 5.1 User Guide and link to Gradle documentation
  • Remove documentation for custom plugin from future 5.2 User Guide
  • Document most frequent use cases of native test task in User Guide (e.g. how to use config params)
  • Create follow-up task to delete subproject for 5.3 M1
@marcphilipp
Copy link
Member Author

Our Gradle plugin is now deprecated and is scheduled to be discontinued with #1331.

@ghost ghost removed the status: in progress label Mar 17, 2018
Andrei94 pushed a commit to Andrei94/junit5 that referenced this issue Jun 23, 2018
Andrei94 pushed a commit to Andrei94/junit5 that referenced this issue Jun 23, 2018
ryanhall07 pushed a commit to cashapp/misk that referenced this issue Dec 4, 2018
The junit plugin has been deprecated since native support was introduced
in 4.6.

junit-team/junit5#1317

Also add some logging options to make the logs more readable. By default
all the stdout is skipped. It can be enabled with --info
dbyron-sf added a commit to mattgogerly/clouddriver that referenced this issue Jun 23, 2024
since it's deprecated (see junit-team/junit5#1317).

Once it's gone, the regular gradle test task properly reports failures.
mergify bot added a commit to spinnaker/clouddriver that referenced this issue Jun 26, 2024
* chore(build): enable cross compilation plugin for Java 17

* chore(build): upgrade ErrorProne to support JDK 17

* chore(build): run spotless

* chore(test): remove usage of deprecated AssertJ methods

* chore(cloudfoundry): remove org.junit.platform.gradle.plugin

since it's deprecated (see junit-team/junit5#1317).

Once it's gone, the regular gradle test task properly reports failures.

* chore(cloudfoundry/test): replace deprecated isEqualToComparingFieldByFieldRecursively

with usingRecursiveComparison().isEqualTo

* fix(cloudfoundry/test): use ignoringCollectionOrder to fix test failures

like:

$ ./gradlew -PenableCrossCompilerPlugin=true :clouddriver-cloudfoundry:test --tests CloudFoundryLoadBalancerCachingAgentTest

> Task :clouddriver-cloudfoundry:test

CloudFoundryLoadBalancerCachingAgentTest > handleShouldReturnOnDemandResultsWithCacheTimeAndNoProcessedTime() FAILED
    java.lang.AssertionError:
    Expecting actual:
      OnDemandAgent.OnDemandResult(sourceAgentType=account/CloudFoundryLoadBalancerCachingAgent-OnDemand, authoritativeTypes=[], cacheResult=com.netflix.spinnaker.cats.agent.DefaultCacheResult@8aeab9e, evictions={})
    to be equal to:
      OnDemandAgent.OnDemandResult(sourceAgentType=account/CloudFoundryLoadBalancerCachingAgent-OnDemand, authoritativeTypes=[], cacheResult=com.netflix.spinnaker.cats.agent.DefaultCacheResult@2a2dc0a, evictions={})
    when recursively comparing field by field, but found the following difference:

    field/property 'cacheResult.cacheResults.loadBalancers' differ:
    - actual value  : [com.netflix.spinnaker.clouddriver.cloudfoundry.cache.ResourceCacheData@bd31962c]
    - expected value: [com.netflix.spinnaker.clouddriver.cloudfoundry.cache.ResourceCacheData@bd3195f1]
    The following actual elements were not matched in the expected SingletonSet:
      [com.netflix.spinnaker.clouddriver.cloudfoundry.cache.ResourceCacheData@bd31962c]

    The recursive comparison was performed with this configuration:
    - no overridden equals methods were used in the comparison (except for java types)
    - these types were compared with the following comparators:
      - java.lang.Double -> DoubleComparator[precision=1.0E-15]
      - java.lang.Float -> FloatComparator[precision=1.0E-6]
      - java.nio.file.Path -> lexicographic comparator (Path natural order)
    - actual and expected objects and their fields were compared field by field recursively even if they were not of the same type, this allows for example to compare a Person to a PersonDto (call strictTypeChecking(true) to change that behavior).
        at com.netflix.spinnaker.clouddriver.cloudfoundry.provider.agent.CloudFoundryLoadBalancerCachingAgentTest.handleShouldReturnOnDemandResultsWithCacheTimeAndNoProcessedTime(CloudFoundryLoadBalancerCachingAgentTest.java:191)

It's not clear why ignoring the order when comparing what looks like a singleton set is important, but I'd like to unblock the java 17 progress.

---------

Co-authored-by: David Byron <dbyron@salesforce.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant