<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Mauricio, <br>
    <br>
    Feel free to delete the code instead of commenting it out,
    especially if you can't use @Ignore. <br>
    <br>
    Commented out code is more often confusing than not. :) <br>
    <br>
    Thanks,<br>
    Marco<br>
    <br>
    11-05-12 10:46, Mauricio Salatino:
    <blockquote
cite="mid:CANzbnyUyf564A=wzYRB6rowB1=dfDmZMZfP9CMbhWiby_ejN+w@mail.gmail.com"
      type="cite">Hi guys,&nbsp;
      <div>I was working yesterday trying to understand why we have&nbsp;<span
          style="font-family:Helvetica;font-size:12px">390 test running
          inside jbpm-human-task-core and if they are really necessary.</span></div>
      <div><font face="Helvetica"><span style="font-size:12px">This is
            my initial approach so forgive me if I'm missing something,
            the following notes and changes are what I found until now:</span></font></div>
      <div><font face="Helvetica"><span style="font-size:12px"><br>
          </span></font></div>
      <div><font face="Helvetica"><span style="font-size:12px">1)&nbsp;
          </span></font><span
          style="font-family:Helvetica;font-size:12px">All the test
          classes using directly TaskClient should be removed, now
          everything should go through TaskService and AsyncTaskService&nbsp;</span></div>
      <div><span style="font-family:Helvetica;font-size:12px">test which
          are placed inside async and sync. For that reason all the test
          inside&nbsp;org.jbpm.task.service are commented out.</span></div>
      <div><span style="font-family:Helvetica;font-size:12px">I've
          checked that all the test classes that were using TaskClient
          now has their correspondency inside the&nbsp;</span><span
          style="font-family:Helvetica;font-size:12px">org.jbpm.task.service.base.</span><span
          style="font-family:Helvetica;font-size:12px">async package.</span></div>
      <div><font face="Helvetica"><span style="font-size:12px">Where the
            only important change is from TaskClient
            to&nbsp;AsyncTaskService. We were running the same tests for both
            wasting a lot of time.</span></font></div>
      <div><span style="font-family:Helvetica;font-size:12px">Now the
          base.sync package tests everything using</span><font
          class="Apple-style-span" face="arial, sans-serif"
          color="#222222">&nbsp;the&nbsp;TaskService interface. Right now there
          are not the same tests for the sync and the&nbsp;</font></div>
      <div><font class="Apple-style-span" face="arial, sans-serif"
          color="#222222">async interface but I can migrate them soon.&nbsp;</font></div>
      <div><font face="Helvetica"><span style="font-size:12px"><br>
          </span></font></div>
      <div><span style="font-family:Helvetica;font-size:12px"><br>
        </span></div>
      <div><span style="font-family:Helvetica;font-size:12px">2)
          Reviewing the&nbsp;org.jbpm.task.service package I found all the
          UserGroupCallback tests and the class
          called&nbsp;BaseTestNoUserGroupSetup, which basically run almost</span></div>
      <div><span style="font-family:Helvetica;font-size:12px">all the
          test using no hardcoded users and using the UserCallbacks
          resolutions. Talking yesterday with Tiho, we both agree that
          we should remove the tests&nbsp;</span></div>
      <div><font class="Apple-style-span" face="Helvetica"><span
            class="Apple-style-span" style="font-size:12px">that are
            using hardcoded users and just leave the one that are using
            callbacks to avoid running unnecessary tests. Just doing
            this we will remove a lot of overhead</span></font></div>
      <div><font class="Apple-style-span" face="Helvetica"><span
            class="Apple-style-span" style="font-size:12px">and we can
            have a simplified way of organizing and running the tests.
            I've moved all the UserGroupCallback tests to the async
            package and migrate them to use the AsyncTaskService instead
            of the TaskClient.&nbsp;</span></font></div>
      <div><font class="Apple-style-span" face="Helvetica"><span
            class="Apple-style-span" style="font-size:12px"><br>
          </span></font></div>
      <div><font class="Apple-style-span" face="Helvetica"><span
            class="Apple-style-span" style="font-size:12px">3)&nbsp;</span></font><span
          class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px">I've created a
          package called org.jbpm.task.identity to place the LDAP stuff
          which is ignored and the UserGroupCallBack stuff that is not
          using the TaskService/TaskClient stuff, when I was doing that
          I notice that those tests uses some properties files that
          needs to be placed inside the same package structure to be
          picked up, for that reason I've moved two classes inside
          src/main/java to the following new
          package:&nbsp;org.jbpm.task.identity
          -&gt;&nbsp;UserGroupCallbackManager, UserGroupCallback,
          DefaultUserGroupCallbackImpl, LDAPUserGroupCallbackImpl, which
          I believe that is better than have the UserGroupCallback stuff
          mixed with the task.service stuff. I notice that the
          package:&nbsp;org.jbpm.task.service is a wild area, that we should
          avoid as much as possible. I know that this is a change that
          can impact in other modules like the jbpm-console but I think
          that it will avoid future troubles. I really need your
          feedback on this.. to see if you guys think that this can
          cause a lot of troubles.</span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px"><br>
        </span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px">4) for the same
          reason as 1 I've commented out all the tests
          inside&nbsp;org.jbpm.task.service.test, those were using the
          TaskClient and because the async and sync test are already
          provided we don't miss anything. The only thing that we need
          to do inside the&nbsp;org.jbpm.task.service.test package is to
          align these tests to cover all the base async and sync tests,
          which is not the case right now, but it's simple to do it.</span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px"><br>
        </span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px">5) I've added
          covertura to the jbpm-human-task-core project to do an initial
          analysis about what we are covering with our tests. Attached
          is the initial chart that I would love to see improved in the
          following months :)&nbsp;</span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px"><br>
        </span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px"><br>
        </span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px">6) I need to work
          on the other modules to propagate these changes as well, but
          for doing that I need your feedback on the previous points, I
          think that during the weekend I will be able to finish the
          other modules, if we all are OK with this suggestions.</span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px"><br>
        </span></div>
      <div><span class="Apple-style-span"
          style="font-family:Helvetica;font-size:12px">Cheers</span></div>
      <div><font class="Apple-style-span" face="Helvetica"><span
            class="Apple-style-span" style="font-size:12px"><br>
          </span></font></div>
      <div><font face="Helvetica"><span style="font-size:12px"><br>
          </span></font>
        <div><br>
        </div>
        -- <br>
        &nbsp;- MyJourney @ <a moz-do-not-send="true"
          href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a>
        <div>
          &nbsp;- Co-Founder @ <a moz-do-not-send="true"
            href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br>
          &nbsp;- Co-Founder @ <a moz-do-not-send="true"
            href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
          &nbsp;<br>
          &nbsp;- Salatino "Salaboy" Mauricio -</div>
        <br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
jBPM/Drools developer
Utrecht, the Netherlands</pre>
  </body>
</html>