Skip to content

Commit

Permalink
Now the error is ACTUALLY replicated-- the first arg returned is actu…
Browse files Browse the repository at this point in the history
…ally the cont of entries found, not an error code.
  • Loading branch information
mikermcneil committed Mar 21, 2013
1 parent 0fc3fb7 commit 51e3acf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 4 additions & 0 deletions lib/dirty/dirty.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Dirty.prototype.forEach = function(fn) {





// Called when a dirty connection is instantiated
Dirty.prototype._load = function() {
var self = this, buffer = '', length = 0;

Expand Down Expand Up @@ -168,6 +171,7 @@ Dirty.prototype._load = function() {
});

this._writeStream.on('drain', function() {

self._writeDrain();
});
};
Expand Down
12 changes: 2 additions & 10 deletions test/node_v0.10.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,13 @@ else {
describe('using the disk store', function() {

it('should trigger the callback if provided', function(cb) {
connectToDiskDb(function (err, db) {
if (err) {
console.error("Could not connect to disk database!",err);
return cb(err);
}
connectToDiskDb(function (count, db) {
setSample(db,cb);
});
});

it('should trigger the callback for each of 10 db calls', function(cb) {
connectToDiskDb(function (err, db) {
if (err) {
console.error("Could not connect to disk database!",err);
return cb(err);
}
connectToDiskDb(function (count, db) {
async.eachSeries(_.range(10),function (i,cb) {
setSample(db, cb);
}, cb);
Expand Down

0 comments on commit 51e3acf

Please sign in to comment.