Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
146 stars 71 forks source link

Remove groovy/spock dependencies #1188

Closed tdrwenski closed 6 months ago

tdrwenski commented 1 year ago

Overview

There are currently 18 .groovy files that have Spock tests in NetCDF-java. These should be converted to JUnit tests and then the dependencies on groovy and spock should be removed from the gradle build files. Some tests may need to to be altered because you can test private methods with Spock but not with JUnit.

Files

To convert:

./cdm/core/src/test/groovy/ucar/nc2/ft2/coverage/HorizCoordSysCrossSeamBoundarySpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/ft2/coverage/writer/CFGridCoverageWriter2Spec.groovy
./cdm/core/src/test/groovy/ucar/nc2/ft2/coverage/HorizCoordSysGisTextBoundarySpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/util/cache/ReacquireClosedDatasetSpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/ncml/LogicalViewsSpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/ncml/NcMLWriterSpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/ncml/CacheAggregationsSpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/iosp/netcdf3/N3iospSpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/ft/point/FlattenedDatasetPointCollectionSpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/ft/point/PointIteratorFilteredSpec.groovy
./cdm/core/src/test/groovy/ucar/nc2/ft/point/remote/PointStreamSpec.groovy
./netcdf4/src/unloadedTest/groovy/ucar/nc2/jni/netcdf/UnloadedNc4IospSpec.groovy
./netcdf4/src/test/groovy/ucar/nc2/jni/netcdf/Nc4IospSpec.groovy
./netcdf4/src/test/groovy/ucar/nc2/jni/netcdf/Nc4IospMiscSpec.groovy

These tests are testing no longer used legacy code and so can just be removed:

./legacy/src/test/groovy/thredds/crawlabledataset/s3/ThreddsS3ClientImplSpec.groovy
./legacy/src/test/groovy/thredds/crawlabledataset/s3/CachingThreddsS3ClientSpec.groovy
./legacy/src/test/groovy/thredds/crawlabledataset/s3/CrawlableDatasetAmazonS3Spec.groovy
./legacy/src/test/groovy/thredds/crawlabledataset/s3/S3URISpec.groovy

UnloadedNc4IospSpec may be a good one to start with as it does not look too complicated.