You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Patrick Rhomberg (JIRA)" <ji...@apache.org> on 2018/10/12 16:35:00 UTC

[jira] [Created] (GEODE-5859) Extract String code from test classes

Patrick Rhomberg created GEODE-5859:
---------------------------------------

             Summary: Extract String code from test classes
                 Key: GEODE-5859
                 URL: https://issues.apache.org/jira/browse/GEODE-5859
             Project: Geode
          Issue Type: Improvement
          Components: tests
            Reporter: Patrick Rhomberg


In several Acceptance and DUnit tests, in particular in tests dealing with {{deploy jar}}, we commonly have code blocks like the following:
{noformat}
  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;
  }
{noformat}

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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)