Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,8 @@ private static class ProgressableListener implements ProgressListener {
this.progress = progress;
}

public void progressChanged(ProgressListenerEvent eventType, int bytesTransferred) {
@Override
public void progressChanged(ProgressListenerEvent eventType, long bytesTransferred) {
if (progress != null) {
progress.progress();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.atomic.AtomicLong;

import org.assertj.core.api.Assertions;
import org.junit.Test;
Expand Down Expand Up @@ -213,8 +214,11 @@ public void testCreateFilePerformanceFlag() throws Throwable {
S3AFileSystem fs = getFileSystem();

Path path = methodPath();
// increment progress events
AtomicLong progressEvents = new AtomicLong(0);
FSDataOutputStreamBuilder builder = fs.createFile(path)
.overwrite(false)
.progress(progressEvents::incrementAndGet)
.recursive();

// this has a broken return type; something to do with the return value of
Expand All @@ -225,6 +229,10 @@ public void testCreateFilePerformanceFlag() throws Throwable {
always(NO_HEAD_OR_LIST),
with(OBJECT_BULK_DELETE_REQUEST, 0),
with(OBJECT_DELETE_REQUEST, 0));

Assertions.assertThat(progressEvents.get())
.describedAs("progress events")
.isGreaterThanOrEqualTo(1);
}

@Test
Expand Down