Commit 2b6f0a0c authored by Tristan Cavelier's avatar Tristan Cavelier

JIO job management tests wrong date used fixed

parent e971e500
...@@ -681,10 +681,10 @@ ...@@ -681,10 +681,10 @@
"options": {"max_retry": 2, "timeout": 12}, "options": {"max_retry": 2, "timeout": 12},
"storage_spec": {"type": "fake", "id": "1 Job Manage"}, "storage_spec": {"type": "fake", "id": "1 Job Manage"},
"method": "get", "method": "get",
"created": new Date(0), "created": new Date(),
"tried": 1, "tried": 1,
"state": "running", "state": "running",
"modified": new Date(0), "modified": new Date(),
"max_retry": 2, "max_retry": 2,
"timeout": 12, "timeout": 12,
"id": 1 "id": 1
...@@ -694,9 +694,9 @@ ...@@ -694,9 +694,9 @@
uniqueJSONStringify([o.job1]) uniqueJSONStringify([o.job1])
}, 'Job added, workspace have one job'); }, 'Job added, workspace have one job');
clock.tick(1); clock.tick(1); // now: 1 ms
fakestorage["1 Job Manage/get"].success({"_id": "a", "b": "c"}); fakestorage["1 Job Manage/get"].success({"_id": "a", "b": "c"});
clock.tick(1); clock.tick(1); // now: 2 ms
deepEqual(workspace, {}, 'Job ended, empty workspace'); deepEqual(workspace, {}, 'Job ended, empty workspace');
...@@ -712,7 +712,10 @@ ...@@ -712,7 +712,10 @@
"statusText": "Ok" "statusText": "Ok"
}, "First job respond"); }, "First job respond");
}); });
clock.tick(1); o.job1.kwargs._id = 'b';
o.job1.created = new Date();
o.job1.modified = new Date();
clock.tick(1); // now: 3 ms
fakestorage["1 Job Manage/get"].storage({ fakestorage["1 Job Manage/get"].storage({
"type": "fake", "type": "fake",
"id": "2 Job Manage" "id": "2 Job Manage"
...@@ -726,16 +729,15 @@ ...@@ -726,16 +729,15 @@
}, "Second job respond"); }, "Second job respond");
}); });
o.job1.kwargs._id = 'b';
o.job2 = { o.job2 = {
"kwargs": {"_id": "c"}, "kwargs": {"_id": "c"},
"options": {}, "options": {},
"storage_spec": {"type": "fake", "id": "2 Job Manage"}, "storage_spec": {"type": "fake", "id": "2 Job Manage"},
"method": "get", "method": "get",
"created": new Date(0), "created": new Date(),
"tried": 1, "tried": 1,
"state": "running", "state": "running",
"modified": new Date(0), "modified": new Date(),
"max_retry": 3, "max_retry": 3,
"timeout": 10000, "timeout": 10000,
"id": 2 "id": 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment