RFR: 8173372 Add tests for multi-release module jar API validator

Paul Sandoz paul.sandoz at oracle.com
Wed Jan 25 19:19:35 UTC 2017


> On 25 Jan 2017, at 10:54, Andrey Nazarov <andrey.x.nazarov at oracle.com> wrote:
> 
> Hi,
> 
> I’ve added tests to check what MR Jar API validator handles changes in module-info.class
> 
> Review: http://cr.openjdk.java.net/~anazarov/8173372/webrev.01/webrev/
> JBS: https://bugs.openjdk.java.net/browse/JDK-8173372
> 

Looks ok.


I think you can reduce some of the boiler plate by having before/after test methods:

Path root;
Path classes;

@BeforeMethod
void testInit(Method m) {
  root = Paths.get(method.getName());
  classes = root.resolve("classes");
}

@AfterMethod
void testCleanup() {
  FileUtils.deleteFileTreeWithRetry(root);
}


I dunno if your test methods really need to declare "throws Throwable”.

Paul.


More information about the core-libs-dev mailing list