Skip to content

Commit

Permalink
test: make smoke test spam less (#459)
Browse files Browse the repository at this point in the history
* test: make smoke test spam less

If we had charged tests for using lines of stdout, this one would've gone bankrupt soon.

* lint
  • Loading branch information
alexander-fenster authored Feb 1, 2019
1 parent 252180b commit 3d21473
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions smoke-test/publisher_smoke_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,16 @@ describe('PublisherSmokeTest', () => {
});

const formattedProject = client.projectPath(projectId);
let counter = 0;
client
.listTopicsStream({project: formattedProject})
.on('data', element => {
console.log(element);
.on('data', () => {
++counter;
})
.on('error', done)
.on('end', done);
.on('end', () => {
console.log(`${counter} elements received.`);
done();
});
});
});

0 comments on commit 3d21473

Please sign in to comment.