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

Java11 testing fails due to String 'code' compiled in test VM

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • tests
    • None

    Description

      In several Acceptance and DUnit tests, in particular in tests dealing with deploy jar, we commonly have code blocks like the following:

        private File createJar() throws IOException {
          File jarToDeploy = new File(gfsh.getTemporaryFolder().getRoot(), "ourJar.jar");
      
          String classContents =
              "import org.apache.geode.cache.util.ObjectSizer; import org.apache.geode.cache.Declarable;public class MySizer implements ObjectSizer, Declarable { public int sizeof(Object o) { return 10; } }";
      
          JarBuilder jarBuilder = new JarBuilder();
          jarBuilder.buildJar(jarToDeploy, classContents);
      
          return jarToDeploy;
        }
      

      This causes tests to fail when run in Java11, as code compiled in the Java11 test VM cannot execute on the Java8-compiled server VMs.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              prhomberg Patrick Rhomberg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m