Skip to content

Commit

Permalink
do fix test
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun committed Dec 18, 2024
1 parent 11de935 commit a53af05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bindings/java/src/main/java/org/apache/opendal/Operator.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public OperatorOutputStream createOutputStream(String path) {
return new OperatorOutputStream(this, path);
}

public OperatorOutputStream createOutputStream(String path, int maxBytes) {
return new OperatorOutputStream(this, path, maxBytes);
}

public byte[] read(String path) {
return read(nativeHandle, path);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void testAzblobLargeFile() throws Exception {
final int size = 16384 * 10; // 10 x OperatorOutputStream.DEFAULT_MAX_BYTES (10 flushes per write)
final byte[] content = generateBytes(size);

try (OperatorOutputStream operatorOutputStream = op().createOutputStream(path)) {
try (OperatorOutputStream operatorOutputStream = op().createOutputStream(path, size)) {
for (int i = 0; i < 20000; i++) {
// More iterations in case BlockCountExceedsLimit doesn't pop up exactly after 100K blocks.
operatorOutputStream.write(content);
Expand Down

0 comments on commit a53af05

Please sign in to comment.