Skip to content

Commit

Permalink
compute.createJob -> compute.startJob in tests. Fixes #1904 (#1905)
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb committed Sep 11, 2020
1 parent 4b0d8b4 commit ef84001
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/unit/common/compute/backends/local/Client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ describe('local compute', function() {
const testFixture = require('../../../../../globals');
const GeneratedFiles = testFixture.requirejs('deepforge/plugin/GeneratedFiles');
const Compute = testFixture.requirejs('deepforge/compute/index');
const {ComputeJob} = testFixture.requirejs('deepforge/compute/backends/ComputeJob');
const BlobClient = require('webgme-engine/src/server/middleware/blob/BlobClientWithFSBackend');
const gmeConfig = testFixture.getGmeConfig();
const blobClient = new BlobClient(gmeConfig, testFixture.logger);
Expand All @@ -22,7 +23,8 @@ describe('local compute', function() {
}
});

jobInfo = await client.createJob(jobHash);
const computeJob = new ComputeJob(jobHash);
jobInfo = await client.startJob(computeJob);
await deferred.promise;
});

Expand Down
5 changes: 3 additions & 2 deletions test/unit/plugins/ExecuteJob/ExecuteJob.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('ExecuteJob', function () {
}
done();
};
mockCompute.createJob = async () => jobInfo;
mockCompute.startJob = async () => jobInfo;
plugin.compute = mockCompute;

return Q(plugin.createJob(node, jobInfo.hash))
Expand Down Expand Up @@ -264,7 +264,8 @@ describe('ExecuteJob', function () {
});

class MockCompute extends ComputeClient {
createJob(hash) {
startJob(job) {
const {hash} = job;
this.jobId = hash;
return {hash};
}
Expand Down

0 comments on commit ef84001

Please sign in to comment.