Class TestDir


  • public class TestDir
    extends Object
    Manage the test data directories and servers.
    Since:
    3/23/12

    -D Property Names
    Static Variable Property Name(s) Description
    testdataDirPropName unidata.testdata.path Property name for the path to the Unidata test data directory, e.g unidata.testdata.path=/share/testdata
    remoteTestServerPropName remotetest Property name for the hostname of the C-library remote test server.

    Computed Paths
    Static Variable Property Name(s) (-d) Default Value Description
    cdmUnitTestDir NA NA New test data directory. Do not put temporary files in here. Migrate all test data here eventually.
    cdmLocalTestDataDir NA ../cdm-core/src/test/data/ Level 1 test data directory (distributed with code and MAY be used in PR testing on GitHub).
    remoteTestServer remotetestserver remotetest.unidata.ucar.edu The hostname of the test server for doing C library remote tests.
    • Field Detail

      • cdmUnitTestDir

        public static String cdmUnitTestDir
        Unidata test data for the CDM. testdataDir + CdmUnitTest.
      • cdmLocalTestDataDir

        public static String cdmLocalTestDataDir
        The cdm-core local test data, use from any top level gradle subproject.
      • bufrLocalTestDataDir

        public static String bufrLocalTestDataDir
        The cdm-core local test data, use from any top level gradle subproject.
      • cdmTestDataDir

        public static String cdmTestDataDir
        cdm-test data directory (distributed with code but can depend on data not in github (e.g. NcML files can reference data not in github)
      • remoteTestServer

        public static String remoteTestServer
      • dap2TestServerPropName

        public static String dap2TestServerPropName
      • dap2TestServer

        public static String dap2TestServer
      • dap4TestServerPropName

        public static String dap4TestServerPropName
      • dap4TestServer

        public static String dap4TestServer
    • Constructor Detail

      • TestDir

        public TestDir()
    • Method Detail

      • checkLeaks

        public static long checkLeaks()
      • FileFilterSkipSuffix

        public static FileFilter FileFilterSkipSuffix​(String suffixes)
      • actOnAll

        public static int actOnAll​(String dirName,
                                   FileFilter ff,
                                   TestDir.Act act,
                                   boolean recurse)
                            throws IOException
        Call act.doAct() on each file in dirName passing the file filter
        Parameters:
        dirName - recurse into this directory
        ff - for files that pass this filter, may be null
        act - perform this acction
        recurse - recurse into subdirectories
        Returns:
        count
        Throws:
        IOException - on IO error
      • readAllData

        public static int readAllData​(ucar.nc2.NetcdfFile ncfile)
                               throws IOException
        Throws:
        IOException
      • locateThreddsRoot

        public static String locateThreddsRoot()