Skip to content

tests: unify DB setup; add TTL & nil-key tests#22

Draft
rawbytedev wants to merge 5 commits into
mainfrom
tests
Draft

tests: unify DB setup; add TTL & nil-key tests#22
rawbytedev wants to merge 5 commits into
mainfrom
tests

Conversation

@rawbytedev

@rawbytedev rawbytedev commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Tasks

  • Add tests for nil key handling across all backends

  • Test batch operations including failure situations

  • Validate iterator resource cleanup

  • Add chaos testing (context cancellation/failure cases)

  • Implement benchmark reporting in CI

  • Add performance regression detection

  • Include cross-platform and matrix testing in CI/CD

Replace direct NewBadgerDB/NewPebbleDB calls with fixture.SetupDB and add proper defer db.Close() across tests. Add TTL-related tests for Badger (TestTTTL, TestBatchTTL) and key-nil behavior tests (TestKeyNil) for both implementations, and adjust expectations accordingly (Badger should error on nil key, Pebble should not). Ensure iterators are released via deferred it.Release() and tighten iteration assertions (expect 10 items). Update testing/crud_test.go to close DBs in helper tests and generalize the TestClose error message.
@rawbytedev rawbytedev self-assigned this Jun 11, 2026
@rawbytedev rawbytedev linked an issue Jun 11, 2026 that may be closed by this pull request
7 tasks
Replace direct NewBadgerDB/NewPebbleDB calls with fixture.SetupDB and add proper defer db.Close() across tests. Add TTL-related tests for Badger (TestTTTL, TestBatchTTL) and key-nil behavior tests (TestKeyNil) for both implementations, and adjust expectations accordingly (Badger should error on nil key, Pebble should not). Ensure iterators are released via deferred it.Release() and tighten iteration assertions (expect 10 items). Update testing/crud_test.go to close DBs in helper tests and generalize the TestClose error message.
@rawbytedev

Copy link
Copy Markdown
Owner Author
  • Replaced direct NewBadgerDB/NewPebbleDB calls with fixture.SetupDB
  • added proper defer db.Close() across tests.
  • Added TTL-related tests for Badger (TestTTTL, TestBatchTTL) and key-nil behavior tests (TestKeyNil) for both implementations
  • adjusted expectations accordingly (Badger should error on nil key, Pebble should not).
  • Ensured iterators are released via deferred it.Release() and tighten iteration assertions (expect 10 items).
  • Updated testing/crud_test.go to close DBs in helper tests and generalize the TestClose error message.

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.

Testing & Quality Assurance Upgrades

1 participant