Skip to content

Conversation

@sosyz
Copy link
Member

@sosyz sosyz commented May 25, 2025

Summary

Adds complete test suite for KV storage plugin covering CRUD operations, transactions, concurrency, and edge cases.

What's Added

  • Basic Operations: CRUD, group operations, cache consistency
  • Transaction Testing: Success, rollback, and nested transactions
  • Edge Cases: Empty keys/groups, non-existent data, cache penetration
  • Pagination: Multi-page data retrieval with boundary testing
  • Concurrency: Multi-threaded operations and stress testing (1000+ ops)

@sosyz sosyz requested review from LinkinStars and Copilot May 25, 2025 16:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a comprehensive test suite for the KV storage plugin, ensuring that CRUD operations, transactions, concurrency, edge cases, and pagination are thoroughly verified.

  • Adds multiple configurations for different databases (MySQL, PostgreSQL, SQLite) using Docker for image-based tests
  • Implements global setup and teardown routines for test data source initialization and resource cleanup
  • Covers diverse test cases including basic operations, transaction handling, boundary conditions, and stress testing

dbSetting = dbSettingMapping[string(schemas.SQLITE)]
}
if dbSetting.Driver == string(schemas.SQLITE) {
os.RemoveAll(dbSetting.Connection)
Copy link

Copilot AI May 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using os.Remove instead of os.RemoveAll for SQLite file removal, as the cleanup function later uses os.Remove. This change would improve consistency in how temporary files are deleted.

Suggested change
os.RemoveAll(dbSetting.Connection)
os.Remove(dbSetting.Connection)

Copilot uses AI. Check for mistakes.
@LinkinStars LinkinStars merged commit 4175b06 into apache:dev May 28, 2025
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