mirror of https://github.com/apache/jclouds.git
marker should be null when there are no more items
This commit is contained in:
parent
ed1149141d
commit
2c578d7bcb
|
@ -206,9 +206,7 @@ public class RegionScopedSwiftBlobStore implements BlobStore {
|
|||
List<? extends StorageMetadata> list = transform(objects, toBlobMetadata(container));
|
||||
int limit = Optional.fromNullable(options.getMaxResults()).or(10000);
|
||||
String marker = null;
|
||||
if (list.isEmpty()) {
|
||||
marker = options.getMarker();
|
||||
} else if (list.size() == limit) {
|
||||
if (!list.isEmpty() && list.size() == limit) {
|
||||
marker = list.get(limit - 1).getName();
|
||||
}
|
||||
// TODO: we should probably deprecate this option
|
||||
|
|
|
@ -53,13 +53,6 @@ public class SwiftContainerIntegrationLiveTest extends BaseContainerIntegrationT
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testDelimiter() {
|
||||
// Swift does not return the last marker when listing, which breaks the testDelimiter test. One more query would
|
||||
// need to be made for Swift (using the latest object and getting no results back).
|
||||
throw new SkipException("The test fails for Swift, as it requires one more request");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testDirectory() {
|
||||
// The test fails with swift, where the marker blob for the directory is removed, as part of the call to
|
||||
|
|
|
@ -187,6 +187,8 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest {
|
|||
container);
|
||||
assert container.getNextMarker() == null;
|
||||
|
||||
container = view.getBlobStore().list(containerName, afterMarker("z"));
|
||||
assertThat(container.getNextMarker()).isNull();
|
||||
} finally {
|
||||
returnContainer(containerName);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue