-
Notifications
You must be signed in to change notification settings - Fork 220
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
test(s3stream): add objectStorage rangeRead test #1423
Conversation
warr99
commented
Jun 14, 2024
- Add AbstractObjectStorage close method
- rangeRead test
abstract void doRangeRead(String path, long start, long end, CompletableFuture<ByteBuf> cf, Consumer<Throwable> failHandler, Consumer<CompositeByteBuf> successHandler); | ||
|
||
abstract boolean isUnrecoverable(Throwable ex); | ||
|
||
abstract void objectStorageClose(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
objectStorageClose => close0 or doClose
|
||
|
||
@Tag("S3Unit") | ||
class ObjectStorageTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be AbstractObjectStrorageTest, and implement a mock AbstractObjectStorage
@@ -89,6 +89,19 @@ public AbstractObjectStorage( | |||
S3StreamMetricsManager.registerInflightS3WriteQuotaSupplier(inflightWriteLimiter::availablePermits, currentIndex); | |||
} | |||
|
|||
// used for test only | |||
public AbstractObjectStorage(boolean manualMergeRead) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer use a single base constructor and create a test constructor based on it. If there are many arguments in constructor, we could also use builder mode