update stream clearing to be compatible with node 0.12

This commit is contained in:
Spencer Alger
2015-03-17 12:03:39 -07:00
parent c74e7550de
commit ed26798e5e
4 changed files with 37 additions and 33 deletions

View File

@ -247,7 +247,6 @@ describe('Connection Pool', function () {
var clock = sinon.useFakeTimers();
stub.autoRelease(clock);
debugger;
connection.setStatus('dead');
expect(_.size(clock.timers)).to.eql(1);
var id = _(clock.timers).keys().first();

View File

@ -15,15 +15,7 @@ describe('File Logger', function () {
afterEach(function () {
parentLog.close();
if (logger
&& logger.stream
&& logger.stream._writableState
&& logger.stream._writableState.buffer.length
) {
// empty the buffer manually
logger.stream._writableState.buffer.splice(0);
}
logger && _.clearWriteStreamBuffer(logger.stream);
});
function makeLogger(parent, levels) {

View File

@ -19,11 +19,7 @@ describe('Stream Logger', function () {
afterEach(function () {
parentLog.close();
if (stream._writableState && stream._writableState.buffer.length) {
// empty the buffer manually
stream._writableState.buffer.splice(0);
}
_.clearWriteStreamBuffer(stream);
});
function makeLogger(parent, levels) {