@Override public void doFinish(TestCase tc, JCRTestContext context) throws Exception { super.doFinish(tc, context); // clear all children registryService.getRegistry(sessionProvider).getNode().remove(); context.getSession().save(); }
/** * Creates content in registry on doPrepare() phase. Used for read, update, delete tests. * * @param tc * @param context * @throws Exception */ protected void createContent(TestCase tc, JCRTestContext context) throws Exception { // create content RegistryEntry registryEntry = RegistryEntry.parse(GENERIC_ENTRY.getBytes()); // create list of user names and add generic entry to each user for (int i = 0; i <= sumIterations; i++) { String name = context.generateUniqueName("username"); addUser(name); registryService.createEntry( sessionProvider, RegistryService.EXO_USERS + "/" + name, registryEntry); } }