]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrResultListener.java
Introduce JCR test result
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.jcr / src / main / java / org / argeo / slc / jcr / execution / JcrResultListener.java
index db575885fb9f51deafd4404a52c4ecd753bb8d7c..79e6b12a005448493b634509a57f8b91ac15ce5a 100644 (file)
@@ -31,7 +31,11 @@ import org.argeo.slc.jcr.SlcTypes;
 import org.argeo.slc.test.TestResultPart;
 import org.argeo.slc.test.TestStatus;
 
-/** Persists results in JCR */
+/**
+ * Persists results in JCR by listening to {@link TreeTestResult}. This is to
+ * facilitate transition from legacy approaches and should not be used in new
+ * implementations.
+ */
 public class JcrResultListener implements TreeTestResultListener, SlcNames {
        private final static Log log = LogFactory.getLog(JcrResultListener.class);
 
@@ -174,6 +178,9 @@ public class JcrResultListener implements TreeTestResultListener, SlcNames {
 
                        uuidToIdentifier.remove(uuid);
                        session.save();
+
+                       if (log.isDebugEnabled())
+                               log.debug("Closed test result " + uuid);
                } catch (RepositoryException e) {
                        JcrUtils.discardQuietly(session);
                        log.error("Cannot close result " + testResult, e);