Skip to content

file list v2 behavior fixes - #22509

Merged
jaschrep-msft merged 1 commit into
Azure:mainfrom
jaschrep-msft:file-listing-v2-fixes
Jun 24, 2021
Merged

file list v2 behavior fixes#22509
jaschrep-msft merged 1 commit into
Azure:mainfrom
jaschrep-msft:file-listing-v2-fixes

Conversation

@jaschrep-msft

Copy link
Copy Markdown
Member

Responding to post-merge comments on #21720

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Jun 24, 2021
Comment on lines +385 to +416
given:
primaryDirectoryClient.create()
def nameList = new LinkedList()
def dirPrefix = namer.getRandomName(60)
for (int i = 0; i < 2; i++) {
def subDirClient = primaryDirectoryClient.getSubdirectoryClient(dirPrefix + i)
subDirClient.create()
for (int j = 0; j < 2; j++) {
def num = i * 2 + j + 3
subDirClient.createFile(dirPrefix + num, 1024)
}
}
primaryDirectoryClient.createFile(dirPrefix + 2, 1024)
for (int i = 0; i < 3; i++) {
nameList.add(dirPrefix + i)
}

when:
def fileRefIter = primaryDirectoryClient.listFilesAndDirectories(namer.getResourcePrefix() + extraPrefix, maxResults, null, null).iterator()

then:
for (int i = 0; i < numOfResults; i++) {
Objects.equals(nameList.pop(), fileRefIter.next().getName())
}
!fileRefIter.hasNext()

where:
extraPrefix | maxResults | numOfResults
"" | null | 3
"" | 1 | 3
"noOp" | 3 | 0
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reversion to the old test, keeping old and new service version functionality tested separately.

@kasobol-msft kasobol-msft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jaschrep-msft
jaschrep-msft merged commit 19fa72e into Azure:main Jun 24, 2021
@jaschrep-msft
jaschrep-msft deleted the file-listing-v2-fixes branch August 3, 2022 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants