Skip to content

Commit

Permalink
Fixed issue in Streaming test
Browse files Browse the repository at this point in the history
  • Loading branch information
landrito committed Nov 21, 2016
1 parent a01b15d commit b6b1fec
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/api_callable.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,16 +760,15 @@ describe('streaming', function() {
setTimeout(s.end.bind(s), 50);
});

// TODO: Figure out why this gets broken when longrunning polling test is run.
it.skip('cancels in the middle', function(done) {
it('cancels in the middle', function(done) {
function schedulePush(s, c) {
if (!s.readable) {
return;
}
setTimeout(function() {
var intervalId = setInterval(function() {
s.push(c);
schedulePush(s, c + 1);
c++;
}, 10);
s.on('finish', function() {
clearInterval(intervalId);
});
}
var cancelError = new Error('cancelled');
function func(metadata, options) {
Expand Down

0 comments on commit b6b1fec

Please sign in to comment.