Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
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
Hardik Juneja
jio-main
Commits
c07ac551
Commit
c07ac551
authored
Feb 06, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JIO Restore: Restore old jIO - fixed tests
parent
1feea589
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
test/jiotests.js
test/jiotests.js
+8
-5
No files found.
test/jiotests.js
View file @
c07ac551
...
@@ -203,19 +203,21 @@ generateTools = function (sinon) {
...
@@ -203,19 +203,21 @@ generateTools = function (sinon) {
}
}
};
};
// wait method
// wait method
// NOTED: not sure I understood this correctly
o
.
waitUntilAJobExists
=
function
(
timeout
)
{
o
.
waitUntilAJobExists
=
function
(
timeout
)
{
var
cpt
=
0
var
cpt
=
0
,
job
=
false
;
while
(
true
)
{
while
(
true
)
{
if
(
getLastJob
(
o
.
jio
.
getId
())
!==
undefined
)
{
if
(
getLastJob
(
o
.
jio
.
getId
())
!==
undefined
)
{
job
=
true
;
break
;
break
;
}
}
if
(
timeout
>=
cpt
)
{
if
(
cpt
>=
timeout
)
{
ok
(
false
,
"
No job were added to the queue
"
);
break
;
break
;
}
}
o
.
clock
.
tick
(
25
);
o
.
clock
.
tick
(
25
);
cpt
+=
25
;
cpt
+=
25
;
}
}
ok
(
job
,
"
Waited until job was created
"
);
};
};
o
.
waitUntilLastJobIs
=
function
(
state
)
{
o
.
waitUntilLastJobIs
=
function
(
state
)
{
while
(
true
)
{
while
(
true
)
{
...
@@ -761,10 +763,11 @@ test ("Restore old Jio", function() {
...
@@ -761,10 +763,11 @@ test ("Restore old Jio", function() {
"
application_name
"
:
"
jiotests
"
"
application_name
"
:
"
jiotests
"
});
});
o
.
waitUntilAJobExists
(
30000
);
// timeout 30 sec
o
.
waitUntilAJobExists
(
30000
);
// timeout 30 sec
o
.
testLastJobLabel
(
"
put
"
,
"
Job restored
"
);
o
.
testLastJobLabel
(
"
put
"
,
"
Job restored
"
);
o
.
clock
.
tick
(
1000
);
o
.
clock
.
tick
(
1000
);
ok
(
getLastJob
(
o
.
jio
.
getId
())
===
undefined
,
ok
(
getLastJob
(
typeof
o
.
jio
.
getId
())
===
undefined
,
"
Job executed
"
);
"
Job executed
"
);
o
.
clock
.
tick
(
1000
);
o
.
jio
.
stop
();
o
.
jio
.
stop
();
...
...
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