File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -136,18 +136,19 @@ exports.all = function (test, testCommon) {
136
136
if ( ! deferred ) await sub1 . open ( )
137
137
if ( ! deferred ) await sub2 . open ( )
138
138
139
- const batch1 = sub1 . batch ( )
140
- const batch2 = sub2 . batch ( )
139
+ const batch1 = [ ]
140
+ const batch2 = [ ]
141
141
const keys = [ ]
142
142
143
+ // TODO: write before creating the sublevels, to make the deferred test more meaningful
143
144
for ( let i = 0 ; i < 256 ; i ++ ) {
144
145
const key = keyEncoding === 'buffer' ? Buffer . from ( [ i ] ) : new Uint8Array ( [ i ] )
145
146
keys . push ( key )
146
- batch1 . put ( key , 'aa' )
147
- batch2 . put ( key , 'bb' )
147
+ batch1 . push ( { type : 'put' , key, value : 'aa' } )
148
+ batch2 . push ( { type : 'put' , key, value : 'bb' } )
148
149
}
149
150
150
- await Promise . all ( [ batch1 . write ( ) , batch2 . write ( ) ] )
151
+ await Promise . all ( [ sub1 . batch ( batch1 ) , sub2 . batch ( batch2 ) ] )
151
152
152
153
const entries1 = await sub1 . iterator ( ) . all ( )
153
154
const entries2 = await sub2 . iterator ( ) . all ( )
You can’t perform that action at this time.
0 commit comments