Skip to content
Open
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 @@ -261,7 +261,7 @@ class DeltaSharingRestClient(
if (response != null && response.items != null) {
shares ++= response.items
}
while (response.nextPageToken.nonEmpty) {
while (response.nextPageToken.exists(_.nonEmpty)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add a unit test for this?

val encodedPageToken = URLEncoder.encode(response.nextPageToken.get, "UTF-8")
val target = getTargetUrl(s"/shares?pageToken=$encodedPageToken")
response = getJson[ListSharesResponse](target)
Expand All @@ -280,7 +280,7 @@ class DeltaSharingRestClient(
if (response != null && response.items != null) {
tables ++= response.items
}
while (response.nextPageToken.nonEmpty) {
while (response.nextPageToken.exists(_.nonEmpty)) {
val encodedPageToken = URLEncoder.encode(response.nextPageToken.get, "UTF-8")
val target =
getTargetUrl(s"/shares/$encodedShareName/all-tables?pageToken=$encodedPageToken")
Expand Down