Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

abstract-leveldown tests aren't all passing anymore #40

Closed
max-mapper opened this issue Jul 4, 2015 · 4 comments · Fixed by #83
Closed

abstract-leveldown tests aren't all passing anymore #40

max-mapper opened this issue Jul 4, 2015 · 4 comments · Fixed by #83
Labels
help wanted Extra attention is needed

Comments

@max-mapper
Copy link
Contributor

right now the tests don't pass in latest chrome. Not sure if it was something in chrome, idb-wrapper, or abstract-leveldown that changed but if someone has some time to dig in and try and make the tests pass it would be much appreciated

@max-mapper max-mapper added the help wanted Extra attention is needed label Jul 4, 2015
@mcollina
Copy link
Member

mcollina commented Jul 4, 2015

I max, I think you bumped abstract-leveldown too far, and the module is now broken. From 0.12 to 2.4 there are plenty of breaking changes: e693249.

I hope to have a look asap.

@gritzko
Copy link

gritzko commented Dec 26, 2015

0.12 behavior differs from 2.4
For example, it rebels against empty values.
Quite an annoyance.

timkuijsten pushed a commit to timkuijsten/level.js that referenced this issue Feb 4, 2016
relates to Level#40

fixes the problem with keys. doesn't fix the problem with snapshots
timkuijsten pushed a commit to timkuijsten/level.js that referenced this issue Feb 4, 2016
Fixes Level#43 Level#40 and Level#3. Unfortunately not easy to split out in separate commits.

1. Level#43 "snapshots seem not to work"

The reason snapshots didn't work in the test, is because the iterator was only
opened on the first call to _next. The new version opens the iterator right
away in the constructor (if there is no KeyRange error).

2. Level#40 "abstract-leveldown tests aren't all passing anymore"

Partially fixed by merging PR Level#42 and further fixed by this commit.

3. Level#3 "stop batch reads after limit is reached"

The solution is stop calling cursor.continue() once the limit is reached. The
transaction will automatically timeout as prescribed by the spec. idb-wrapper
can't be used for this because limit is only respected if autoContinue is true.

All 563 tests pass on:
* Safari 9.0.3
* Firefox 45.0b2
* Firefox 46.0a2
* Iridium 44.1 (Chrome/44.0.2403.157)
mvayngrib pushed a commit to mvayngrib/level.js that referenced this issue Aug 21, 2016
Fixes Level#43 Level#40 and Level#3. Unfortunately not easy to split out in separate commits.

1. Level#43 "snapshots seem not to work"

The reason snapshots didn't work in the test, is because the iterator was only
opened on the first call to _next. The new version opens the iterator right
away in the constructor (if there is no KeyRange error).

2. Level#40 "abstract-leveldown tests aren't all passing anymore"

Partially fixed by merging PR Level#42 and further fixed by this commit.

3. Level#3 "stop batch reads after limit is reached"

The solution is stop calling cursor.continue() once the limit is reached. The
transaction will automatically timeout as prescribed by the spec. idb-wrapper
can't be used for this because limit is only respected if autoContinue is true.

All 563 tests pass on:
* Safari 9.0.3
* Firefox 45.0b2
* Firefox 46.0a2
* Iridium 44.1 (Chrome/44.0.2403.157)
@ralphtheninja
Copy link
Member

@maxogden @mcollina I'm actively working on this right now and I'd love to see this repository moved to the level org. @juliangruber and @vweevers are also very active.

@ralphtheninja
Copy link
Member

ralphtheninja commented Sep 11, 2017

0.12 behavior differs from 2.4
For example, it rebels against empty values.
Quite an annoyance.

@gritzko We want to take stuff like that out of abstract-leveldown in a new major version. abstract-leveldown should basically assume nothing about serialization of different *downs. We also want to clean up browser specific assumptions in the code.

@vweevers vweevers mentioned this issue May 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants