update stream clearing to be compatible with node 0.12
This commit is contained in:
@ -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();
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user