git ssb

2+

Dominic / flumedb



Commit 8f18c58c8aa15bbde2a5464401866c1dc61bf372

test db.ready feature

Dominic Tarr committed on 5/20/2017, 8:03:21 AM
Parent: 83ff73d9a728d8da6eca73251d7df14e47a0e29a

Files changed

test/memlog.jschanged
test/memlog.jsView
@@ -68,8 +68,24 @@
6868 )
6969
7070 })
7171
72 + tape('disable ready to stall all reads', function (t) {
73 + var called = false
74 + db.ready.set(false)
75 + db.stats.get([], function (err, value) {
76 + called = true
77 + })
78 + setTimeout(function () {
79 + t.equal(db.ready.value, false)
80 + t.equal(called, false)
81 + db.ready.set(true)
82 + t.equal(called, true) //this should fire immediately
83 + t.end()
84 + }, 100)
85 +
86 + })
87 +
7288 }
7389
7490 if(!module.parent)
7591 module.exports(Flume(MemLog()))

Built with git-ssb-web