Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to dumpData #43

Merged
merged 6 commits into from
Apr 22, 2024
Merged

Fixes to dumpData #43

merged 6 commits into from
Apr 22, 2024

Conversation

samholmes
Copy link
Contributor

@samholmes samholmes commented Apr 20, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved because the code change seems fine, but please fix the tests before merging.

test/HashBase.test.ts Outdated Show resolved Hide resolved
test/HashBase.test.ts Outdated Show resolved Hide resolved
test/HashBase.test.ts Outdated Show resolved Hide resolved
test/HashBase.test.ts Outdated Show resolved Hide resolved
name: string
}
interface TestDataFixture {
[partitionName: string]: TestData[]
}

describe('HashBase baselet', function () {
const memlet = makeMemlet(makeMemoryDisklet())
let hashbaseDb: HashBase<TestData>
Copy link
Contributor

@swansontec swansontec Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for the future, since this is out of scope for your changes:

Each test suite is supposed to be standalone. Mutating a single hashbaseDb from test-to-test means a failure earlier, like in the "insert" test, will also cause fake failures in the "query" test, because the state is wrong. Each test should create & initialize its own unique HashBase instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is inherited. I can create a task for this, but which project should such a task go (backlog?)

This includes the test for `dumpData` with and without a partition
argument.
We shouldn't be assuming that an empty partition will be used by the
user, so we shouldn't initialize all CountBase instances with the empty
partition in the config.
@samholmes samholmes merged commit 7434d30 into master Apr 22, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants