Skip to content

Commit 6b25a91

Browse files
committed
Add highWaterMarkBytes option to tests where it matters
The `classic-level` implementation will have this option, replacing the `highWaterMark` option of `leveldown` which conflicts with streams.
1 parent 2e90b05 commit 6b25a91

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

test/iterator-no-snapshot-test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ exports.noSnapshot = function (test, testCommon) {
1717
t.ifError(err, 'no batch error')
1818

1919
// For this test it is important that we don't read eagerly.
20-
// NOTE: highWaterMark is not an abstract option atm, but
21-
// it is supported by leveldown, rocksdb and others.
22-
const it = db.iterator({ highWaterMark: 0 })
20+
// NOTE: highWaterMarkBytes is not an abstract option, but
21+
// it is supported by classic-level and others. Also set the
22+
// old & equivalent leveldown highWaterMark option for compat.
23+
const it = db.iterator({ highWaterMarkBytes: 0, highWaterMark: 0 })
2324

2425
run(db, function (err) {
2526
t.ifError(err, 'no run error')

test/iterator-snapshot-test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ exports.snapshot = function (test, testCommon) {
1212
t.ifError(err, 'no put error')
1313

1414
// For this test it is important that we don't read eagerly.
15-
// NOTE: highWaterMark is not an abstract option atm, but
16-
// it is supported by leveldown, rocksdb and others.
17-
const it = db.iterator({ highWaterMark: 0 })
15+
// NOTE: highWaterMarkBytes is not an abstract option, but
16+
// it is supported by classic-level and others. Also set the
17+
// old & equivalent leveldown highWaterMark option for compat.
18+
const it = db.iterator({ highWaterMarkBytes: 0, highWaterMark: 0 })
1819

1920
run(t, db, it, function end (err) {
2021
t.ifError(err, 'no run error')

0 commit comments

Comments
 (0)