Changeset 6433


Ignore:
Timestamp:
Mar 14, 2014, 9:04:02 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #1796: Improve support for jobs running on external servers

Fixed issues with jobs in UNCONFIGURED state in the test code.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/appendix/incompatible.xml

    r6429 r6433  
    104104      wrapper extension, but the recommendation is to update those plug-in to the
    105105      new system. See <xref linkend="extensions_developer.login-manager" /> for more information.
     106    </para>
     107   
     108    <bridgehead>Setting parameters for a job no longer set it to status=WAITING</bridgehead>
     109    <para>
     110      Added <methodname>Job.setScheduled()</methodname> to switch the state
     111      from <constant>UNCONFIGURED</constant> to <constant>WAITING</constant>.
     112      A job can't be executed before it has entered the <constant>WAITING</constant>
     113      state. The change makes it possible to register a job and some parameters for
     114      it and remain in the <constant>UNCONFIGURED</constant> state.
    106115    </para>
    107116   
  • trunk/src/test/TestJobAgent.java

    r6127 r6433  
    363363      Job job = Job.getNew(dc, plugin, null, null);
    364364      job.setName(plugin.getName());
    365       job.setParameterValue("dummy", new StringParameterType(), "dummy"); // To end up with status = WAITING
     365      job.setParameterValue("dummy", new StringParameterType(), "dummy");
     366      job.setScheduled(null, JobAgent.getById(dc, agentId)); // To end up with status = WAITING
    366367      dc.saveItem(job);
    367368      dc.commit();
  • trunk/src/test/TestPluginDefinition.java

    r5596 r6433  
    281281      job.setParameterValue("shouldFail", new BooleanParameterType(), shouldFail);
    282282      job.setParameterValue("numNews", new IntegerParameterType(), numNews);
     283      job.setScheduled(null, null);
    283284      dc.saveItem(job);
    284285      dc.commit();
  • trunk/src/test/net/sf/basedb/test/PluginUtil.java

    r5765 r6433  
    144144    DbControl dc = TestUtil.getDbControl();
    145145    job = Job.getById(dc, job.getId());
     146    if (job.getStatus() == Job.Status.UNCONFIGURED)
     147    {
     148      job.setScheduled(null, null);
     149    }
    146150    PluginExecutionRequest request =
    147151      job.execute(new ConsoleProgressReporter(false), TestUtil.getLocalIp());
Note: See TracChangeset for help on using the changeset viewer.