Skip to content

Commit

Permalink
Google Cloud Storage: remove download limit #2084
Browse files Browse the repository at this point in the history
Remove 8MB download limit on GCS files.
  • Loading branch information
Gabriel Reid committed Jan 14, 2020
1 parent 993cbae commit bc2d777
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ import scala.util.control.NonFatal
)
).mapAsync(parallelism)(entityForSuccessOption)
.map {
_.map(_.dataBytes.mapMaterializedValue(_ => NotUsed))
_.map(_.withoutSizeLimit.dataBytes.mapMaterializedValue(_ => NotUsed))
}

}
Expand Down
3 changes: 3 additions & 0 deletions google-cloud-storage/src/test/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ akka {
loglevel = "INFO"
}

// Extra small client parsing limit to allow testing for payloads that are over this limit
akka.http.client.parsing.max-content-length = 10000

//#settings

privateKey ="""-----BEGIN PRIVATE KEY-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ class GCStorageSourceSpec
}

"download file when file exists" in {
val fileContent = "Google storage file content"
// Ensure file content is above the size limit set by akka.http.client.parsing.max-content-length
val fileContent = "Google storage file content" + ("x" * 10000)
val fileContentGeneration = "Google storage file content (archived)"

mockFileDownload(fileContent)
Expand Down

0 comments on commit bc2d777

Please sign in to comment.