Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-8220

Use direct reference to config string in test code, rather than defined constant + case statement

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • native client
    • None

    Description

      In the geode-native test code, we look up the location of a few items as a matter of course, so we don't have to have multiple copies of files like SSL keys floating around in random directories in the source/build trees.  The code to do this uses an enum class for named constants, thusly:

      enum class FrameworkVariable {JavaObjectJarPath, GfShExecutable, TestCacheXmlDir, TestClientSslKeysDir, TestServerSslKeysDir};
      
      const char *getFrameworkString(FrameworkVariable name);
      

      The enum class here is kind of gratuitous, and could simply be replaced with something like the following:

      namespace FrameworkVariables {
          constexpr const char* JavaObjectJarPath = "@<<CMAKE_VARIABLE>>";
      }
      

      The variables could then be directly referenced in test code, rather than looked up via a function call.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bbender Blake Bender
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: