Changeset 4819


Ignore:
Timestamp:
Mar 18, 2009, 2:10:14 PM (15 years ago)
Author:
Nicklas Nordborg
Message:

References #1248: Long running job may cause a timeout on session on internal job queue

Fixes and old error in the tests that was discovered by the fix to #1248.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Job.java

    r4801 r4819  
    16701670      {
    16711671        dc = sc.newDbControl();
    1672         Job job = Job.getById(dc, jobId);
     1672        Job job = jobId == 0 ? this.job : Job.getById(dc, jobId);
    16731673        if (signalTransporter != null && signalId != null)
    16741674        {
     
    16941694      {
    16951695        dc = sc.newDbControl();
    1696         Job job = Job.getById(dc, jobId);
     1696        Job job = jobId == 0 ? this.job : Job.getById(dc, jobId);
    16971697        job.getData().setDryRun(response.isDryRun());
    16981698
  • trunk/src/test/TestPluginDefinition.java

    r4514 r4819  
    273273      job.setParameterValue("shouldFail", new BooleanParameterType(), shouldFail);
    274274      job.setParameterValue("numNews", new IntegerParameterType(), numNews);
     275      dc.saveItem(job);
     276      dc.commit();
     277      jobId = job.getId();
    275278     
     279      dc = TestUtil.getDbControl();
     280      job = Job.getById(dc, jobId);
    276281      PluginExecutionRequest request =
    277282        job.execute(TestUtil.getSilent() ? null : new ConsoleProgressReporter(), TestUtil.getLocalIp());
    278      
    279283      dc.commit();
    280       jobId = job.getId();
    281284     
    282285      PluginResponse response = request.invoke();
Note: See TracChangeset for help on using the changeset viewer.