Closed yarikbratashchuk closed 2 months ago
The recent updates improve error handling in the GetIDs
method of the DummyDA
struct, ensuring safer data access by returning an error when requested data is not found. The test suite also received enhancements, including a new test case to validate this functionality and modifications to existing tests for better error detection in concurrent operations. Together, these changes strengthen the reliability and robustness of the codebase.
Files | Change Summary |
---|---|
test/dummy.go |
Improved error handling in GetIDs method to return an error if no blobs exist for the given height; introduced ErrNoBlobAtHeight . |
test/test_suite.go |
Added NoBlobsAtHeightTest to verify the new error handling; adjusted error checking in ConcurrentReadWriteTest to better handle errors. |
sequenceDiagram
participant Client
participant DummyDA
participant DataStore
Client->>DummyDA: GetIDs(height)
DummyDA->>DataStore: Check if height exists
alt Height exists
DataStore-->>DummyDA: Return IDs
DummyDA-->>Client: Return IDs
else Height does not exist
DummyDA-->>Client: Return error ("no blob at given height")
end
🐇 In a world of data, oh so bright,
I found a way to check what's right.
With graceful errors, I hop with glee,
No more panics—just you and me!
A test to ensure we’re on the way,
To robust code, hip-hip-hooray! 🎉
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@tzdybal as these same fixtures used for proxy test and for direct test, i found that the easiest is to work with strings to identify specific error
Summary by CodeRabbit
New Features
Tests