Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
jio_mebibou
Commits
dbb20e49
Commit
dbb20e49
authored
Aug 22, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jio job recovery tests added
parent
7566a9e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
test/jio/tests.js
test/jio/tests.js
+32
-1
No files found.
test/jio/tests.js
View file @
dbb20e49
...
...
@@ -765,12 +765,43 @@
* Test job recovery
*/
test
(
'
Job Recovery
'
,
function
()
{
expect
(
0
);
expect
(
1
);
var
workspace
=
{},
clock
,
jio
;
clock
=
sinon
.
useFakeTimers
();
// create instance
jio
=
new
JIO
({
"
type
"
:
"
fake
"
,
"
id
"
:
"
Job Recove
"
},
{
"
workspace
"
:
workspace
});
// create a job
jio
.
post
({});
// copy workspace
workspace
=
jIO
.
util
.
deepClone
(
workspace
);
clock
.
tick
(
1
);
fakestorage
[
'
Job Recove/post
'
].
success
({
"
id
"
:
"
a
"
});
// create instance with copied workspace
jio
=
new
JIO
({
"
type
"
:
"
fake
"
,
"
id
"
:
"
Job Recove
"
},
{
"
workspace
"
:
workspace
});
// wait for action
clock
.
tick
(
20020
);
// 20 seconds
if
(
!
fakestorage
[
'
Job Recove/post
'
])
{
return
ok
(
false
,
"
Command not called, job recovery failed
"
);
}
ok
(
true
,
"
Command called, job recovery ok
"
);
fakestorage
[
'
Job Recove/post
'
].
success
({
"
id
"
:
"
a
"
});
// XXX job waiting for time recovery
// XXX job waiting for job recovery
});
}));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment