Build Logs
akka/alpakka • 3.8.0-RC5:2025-12-31
Errors
28
Warnings
656
Total Lines
1087
1##################################
2Clonning https://github.com/akka/alpakka.git into /build/repo using revision v6.0.2
3##################################
4Note: switching to '00c6b6099c9557c5a67125ffd012557f93ccc329'.
5
6You are in 'detached HEAD' state. You can look around, make experimental
7changes and commit them, and you can discard any commits you make in this
8state without impacting any branches by switching back to a branch.
9
10If you want to create a new branch to retain commits you create, you may
11do so (now or later) by using -c with the switch command. Example:
12
13 git switch -c <new-branch-name>
14
15Or undo this operation with:
16
17 git switch -
18
19Turn off this advice by setting config variable advice.detachedHead to false
20
21Would override fixed Scala version: 3.2.2
22----
23Preparing build for 3.8.0-RC5
24Scala binary version found: 3.8
25Implicitly using source version 3.8
26Scala binary version found: 3.8
27Implicitly using source version 3.8
28Would try to apply common scalacOption (best-effort, sbt/mill only):
29Append: ,REQUIRE:-source:3.8
30Remove: ,-deprecation,-feature,-Xfatal-warnings,-Werror,MATCH:.*-Wconf.*any:e
31
32Try apply source patch:
33Path: project/Dependencies.scala
34Pattern: libraryDependencies :=
35Replacement: libraryDependencies ++=
36Starting compilation server
37Compiling project (Scala 3.7.3, JVM (17))
38Compiled project (Scala 3.7.3, JVM (17))
39Successfully applied pattern 'libraryDependencies := ' in project/Dependencies.scala
40
41Try apply source patch:
42Path: project/Dependencies.scala
43Pattern: val Scala3 = "3.2.2"
44Replacement: val Scala3 = "3.8.0-RC5"
45Successfully applied pattern 'val Scala3 = "3.2.2"' in project/Dependencies.scala
46----
47Starting build for 3.8.0-RC5
48Execute tests: true
49sbt project found:
50Sbt version 1.9.1 is not supported, minimal supported version is 1.11.5
51Enforcing usage of sbt in version 1.11.5
52No prepare script found for project akka/alpakka
53##################################
54Scala version: 3.8.0-RC5
55Targets: com.lightbend.akka%akka-stream-alpakka-amqp com.lightbend.akka%akka-stream-alpakka-avroparquet com.lightbend.akka%akka-stream-alpakka-cassandra com.lightbend.akka%akka-stream-alpakka-csv com.lightbend.akka%akka-stream-alpakka-s3
56Project projectConfig: {"projects":{"exclude":[],"overrides":{}},"java":{"version":"17"},"sbt":{"commands":[],"options":[]},"mill":{"options":[]},"tests":"compile-only","migrationVersions":[],"sourcePatches":[{"path":"project/Dependencies.scala","pattern":"libraryDependencies := ","replaceWith":"libraryDependencies ++= "},{"path":"project/Dependencies.scala","pattern":"val Scala3 = \"3.2.2\"","replaceWith":"val Scala3 = \"<SCALA_VERSION>\""}]}
57##################################
58Using extra scalacOptions: ,REQUIRE:-source:3.8
59Filtering out scalacOptions: ,-deprecation,-feature,-Xfatal-warnings,-Werror,MATCH:.*-Wconf.*any:e
60[sbt_options] declare -a sbt_options=()
61[process_args] java_version = '17'
62[copyRt] java9_rt = '/root/.sbt/1.0/java9-rt-ext-eclipse_adoptium_17_0_8/rt.jar'
63# Executing command line:
64java
65-Dfile.encoding=UTF8
66-Xms1g
67-Xss6M
68-Dcommunitybuild.scala=3.8.0-RC5
69-Dcommunitybuild.project.dependencies.add=
70-Xmx7G
71-Xms4G
72-Xss8M
73-Dsbt.script=/root/.sdkman/candidates/sbt/current/bin/sbt
74-Dscala.ext.dirs=/root/.sbt/1.0/java9-rt-ext-eclipse_adoptium_17_0_8
75-jar
76/root/.sdkman/candidates/sbt/1.11.5/bin/sbt-launch.jar
77"setCrossScalaVersions 3.8.0-RC5"
78"++3.8.0-RC5 -v"
79"mapScalacOptions ",REQUIRE:-source:3.8,-Wconf:msg=can be rewritten automatically under:s" ",-deprecation,-feature,-Xfatal-warnings,-Werror,MATCH:.*-Wconf.*any:e""
80"set every credentials := Nil"
81"excludeLibraryDependency com.github.ghik:zerowaste_{scalaVersion} com.olegpy:better-monadic-for_3 org.polyvariant:better-tostring_{scalaVersion} org.wartremover:wartremover_{scalaVersion}"
82"removeScalacOptionsStartingWith -P:wartremover"
83
84moduleMappings
85"runBuild 3.8.0-RC5 """{"projects":{"exclude":[],"overrides":{}},"java":{"version":"17"},"sbt":{"commands":[],"options":[]},"mill":{"options":[]},"tests":"compile-only","migrationVersions":[],"sourcePatches":[{"path":"project/Dependencies.scala","pattern":"libraryDependencies := ","replaceWith":"libraryDependencies ++= "},{"path":"project/Dependencies.scala","pattern":"val Scala3 = \"3.2.2\"","replaceWith":"val Scala3 = \"<SCALA_VERSION>\""}]}""" com.lightbend.akka%akka-stream-alpakka-amqp com.lightbend.akka%akka-stream-alpakka-avroparquet com.lightbend.akka%akka-stream-alpakka-cassandra com.lightbend.akka%akka-stream-alpakka-csv com.lightbend.akka%akka-stream-alpakka-s3"
86
87[info] welcome to sbt 1.11.5 (Eclipse Adoptium Java 17.0.8)
88[info] loading settings for project repo-build from akka.sbt, plugins.sbt...
89[info] loading project definition from /build/repo/project
90[info] compiling 7 Scala sources to /build/repo/project/target/scala-2.12/sbt-1.0/classes ...
91[info] Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.20. Compiling...
92[info] Compilation completed in 8.446s.
93[info] done compiling
94[info] loading settings for project alpakka from build.sbt...
95[info] resolving key references (68092 settings) ...
96[info]
97[info] ** Welcome to the sbt build definition for Alpakka! **
98[info]
99[info] Useful sbt tasks:
100[info]
101[info] docs/previewSite - builds Paradox and Scaladoc documentation,
102[info] starts a webserver and opens a new browser window
103[info]
104[info] test - runs all the tests for all of the connectors.
105[info] Make sure to run `docker-compose up` first.
106[info]
107[info] mqtt/testOnly *.MqttSourceSpec - runs a single test
108[info]
109[info] mimaReportBinaryIssues - checks whether this current API
110[info] is binary compatible with the released version
111[info]
112[warn] there's a key that's not used by any other settings/tasks:
113[warn]
114[warn] * avroparquet-tests / mimaPreviousArtifacts
115[warn] +- /build/repo/build.sbt:480
116[warn]
117[warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check
118[warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key
119Execute setCrossScalaVersions: 3.8.0-RC5
120OpenCB::Changing crossVersion 3.8.0-RC5 -> 3.8.0-RC5 in cassandra/crossScalaVersions
121OpenCB::Changing crossVersion 3.8.0-RC5 -> 3.8.0-RC5 in avroparquet/crossScalaVersions
122OpenCB::Changing crossVersion 3.8.0-RC5 -> 3.8.0-RC5 in amqp/crossScalaVersions
123OpenCB::Changing crossVersion 3.8.0-RC5 -> 3.8.0-RC5 in s3/crossScalaVersions
124OpenCB::Changing crossVersion 3.8.0-RC5 -> 3.8.0-RC5 in csv/crossScalaVersions
125OpenCB::Limitting incorrect crossVersions List() -> List(2.13.10) in alpakka/crossScalaVersions
126OpenCB::Changing crossVersion 3.8.0-RC5 -> 3.8.0-RC5 in testkit/crossScalaVersions
127[info]
128[info] ** Welcome to the sbt build definition for Alpakka! **
129[info]
130[info] Useful sbt tasks:
131[info]
132[info] docs/previewSite - builds Paradox and Scaladoc documentation,
133[info] starts a webserver and opens a new browser window
134[info]
135[info] test - runs all the tests for all of the connectors.
136[info] Make sure to run `docker-compose up` first.
137[info]
138[info] mqtt/testOnly *.MqttSourceSpec - runs a single test
139[info]
140[info] mimaReportBinaryIssues - checks whether this current API
141[info] is binary compatible with the released version
142[info]
143[info] Setting Scala version to 3.8.0-RC5 on 6 projects.
144[info] Switching Scala version on:
145[info] s3 (2.13.10, 2.12.17, 3.8.0-RC5)
146[info] amqp (2.13.10, 2.12.17, 3.8.0-RC5)
147[info] csv (2.13.10, 2.12.17, 3.8.0-RC5)
148[info] cassandra (2.13.10, 2.12.17, 3.8.0-RC5)
149[info] avroparquet (2.13.10, 2.12.17, 3.8.0-RC5)
150[info] testkit (2.13.10, 2.12.17, 3.8.0-RC5)
151[info] Excluding projects:
152[info] ftp (2.13.10, 2.12.17)
153[info] reference (2.13.10, 2.12.17)
154[info] spring-web (2.13.10, 2.12.17)
155[info] sns (2.13.10, 2.12.17)
156[info] google-cloud-pub-sub (2.13.10, 2.12.17)
157[info] jms (2.13.10, 2.12.17)
158[info] unix-domain-socket (2.13.10, 2.12.17)
159[info] slick (2.13.10, 2.12.17)
160[info] geode (2.13.10, 2.12.17)
161[info] azure-storage-queue (2.13.10, 2.12.17)
162[info] dynamodb (2.13.10, 2.12.17)
163[info] google-cloud-bigquery-storage (2.13.10, 2.12.17)
164[info] elasticsearch (2.13.10, 2.12.17)
165[info] docs (2.13.10, 2.12.17)
166[info] google-cloud-pub-sub-grpc (2.13.10, 2.12.17)
167[info] text (2.13.10, 2.12.17)
168[info] mqtt (2.13.10, 2.12.17)
169[info] google-cloud-bigquery (2.13.10, 2.12.17)
170[info] huawei-push-kit (2.13.10, 2.12.17)
171[info] mqtt-streaming (2.13.10, 2.12.17)
172[info] influxdb (2.13.10, 2.12.17)
173[info] csv-bench (2.13.10, 2.12.17)
174[info] aws-event-bridge (2.13.10, 2.12.17)
175[info] xml (2.13.10, 2.12.17)
176[info] sqs (2.13.10, 2.12.17)
177[info] json-streaming (2.13.10, 2.12.17)
178[info] google-fcm (2.13.10, 2.12.17)
179[info] doc-examples (2.13.10, 2.12.17)
180[info] pravega (2.13.10, 2.12.17)
181[info] udp (2.13.10, 2.12.17)
182[info] * alpakka (2.13.10)
183[info] mqtt-streaming-bench (2.13.10, 2.12.17)
184[info] simple-codecs (2.13.10, 2.12.17)
185[info] file (2.13.10, 2.12.17)
186[info] google-common (2.13.10, 2.12.17)
187[info] kinesis (2.13.10, 2.12.17)
188[info] mongodb (2.13.10, 2.12.17)
189[info] ironmq (2.13.10, 2.12.17)
190[info] sse (2.13.10, 2.12.17)
191[info] hbase (2.13.10, 2.12.17)
192[info] kudu (2.13.10, 2.12.17)
193[info] google-cloud-storage (2.13.10, 2.12.17)
194[info] avroparquet-tests (2.13.10, 2.12.17)
195[info] orientdb (2.13.10, 2.12.17)
196[info] couchbase (2.13.10, 2.12.17)
197[info] awslambda (2.13.10, 2.12.17)
198[info] solr (2.13.10, 2.12.17)
199[info] hdfs (2.13.10, 2.12.17)
200[info] Reapplying settings...
201[info]
202[info] ** Welcome to the sbt build definition for Alpakka! **
203[info]
204[info] Useful sbt tasks:
205[info]
206[info] docs/previewSite - builds Paradox and Scaladoc documentation,
207[info] starts a webserver and opens a new browser window
208[info]
209[info] test - runs all the tests for all of the connectors.
210[info] Make sure to run `docker-compose up` first.
211[info]
212[info] mqtt/testOnly *.MqttSourceSpec - runs a single test
213[info]
214[info] mimaReportBinaryIssues - checks whether this current API
215[info] is binary compatible with the released version
216[info]
217Execute mapScalacOptions: ,REQUIRE:-source:3.8,-Wconf:msg=can be rewritten automatically under:s ,-deprecation,-feature,-Xfatal-warnings,-Werror,MATCH:.*-Wconf.*any:e
218[info] Reapplying settings...
219[info]
220[info] ** Welcome to the sbt build definition for Alpakka! **
221[info]
222[info] Useful sbt tasks:
223[info]
224[info] docs/previewSite - builds Paradox and Scaladoc documentation,
225[info] starts a webserver and opens a new browser window
226[info]
227[info] test - runs all the tests for all of the connectors.
228[info] Make sure to run `docker-compose up` first.
229[info]
230[info] mqtt/testOnly *.MqttSourceSpec - runs a single test
231[info]
232[info] mimaReportBinaryIssues - checks whether this current API
233[info] is binary compatible with the released version
234[info]
235[info] Defining Global / credentials, amqp / credentials and 52 others.
236[info] The new values will be used by Global / pgpSelectPassphrase, Global / pgpSigningKey and 269 others.
237[info] Run `last` for details.
238[info] Reapplying settings...
239[info]
240[info] ** Welcome to the sbt build definition for Alpakka! **
241[info]
242[info] Useful sbt tasks:
243[info]
244[info] docs/previewSite - builds Paradox and Scaladoc documentation,
245[info] starts a webserver and opens a new browser window
246[info]
247[info] test - runs all the tests for all of the connectors.
248[info] Make sure to run `docker-compose up` first.
249[info]
250[info] mqtt/testOnly *.MqttSourceSpec - runs a single test
251[info]
252[info] mimaReportBinaryIssues - checks whether this current API
253[info] is binary compatible with the released version
254[info]
255Execute excludeLibraryDependency: com.github.ghik:zerowaste_{scalaVersion} com.olegpy:better-monadic-for_3 org.polyvariant:better-tostring_{scalaVersion} org.wartremover:wartremover_{scalaVersion}
256[info] Reapplying settings...
257OpenCB::Failed to reapply settings in excludeLibraryDependency: Reference to undefined setting:
258
259 Global / allExcludeDependencies from Global / allExcludeDependencies (CommunityBuildPlugin.scala:331)
260 Did you mean unix-domain-socket / allExcludeDependencies ?
261 , retry without global scopes
262[info] Reapplying settings...
263[info]
264[info] ** Welcome to the sbt build definition for Alpakka! **
265[info]
266[info] Useful sbt tasks:
267[info]
268[info] docs/previewSite - builds Paradox and Scaladoc documentation,
269[info] starts a webserver and opens a new browser window
270[info]
271[info] test - runs all the tests for all of the connectors.
272[info] Make sure to run `docker-compose up` first.
273[info]
274[info] mqtt/testOnly *.MqttSourceSpec - runs a single test
275[info]
276[info] mimaReportBinaryIssues - checks whether this current API
277[info] is binary compatible with the released version
278[info]
279Execute removeScalacOptionsStartingWith: -P:wartremover
280[info] Reapplying settings...
281[info]
282[info] ** Welcome to the sbt build definition for Alpakka! **
283[info]
284[info] Useful sbt tasks:
285[info]
286[info] docs/previewSite - builds Paradox and Scaladoc documentation,
287[info] starts a webserver and opens a new browser window
288[info]
289[info] test - runs all the tests for all of the connectors.
290[info] Make sure to run `docker-compose up` first.
291[info]
292[info] mqtt/testOnly *.MqttSourceSpec - runs a single test
293[info]
294[info] mimaReportBinaryIssues - checks whether this current API
295[info] is binary compatible with the released version
296[info]
297[success] Total time: 0 s, completed Dec 31, 2025, 9:10:40 PM
298Build config: {"projects":{"exclude":[],"overrides":{}},"java":{"version":"17"},"sbt":{"commands":[],"options":[]},"mill":{"options":[]},"tests":"compile-only","migrationVersions":[],"sourcePatches":[{"path":"project/Dependencies.scala","pattern":"libraryDependencies := ","replaceWith":"libraryDependencies ++= "},{"path":"project/Dependencies.scala","pattern":"val Scala3 = \"3.2.2\"","replaceWith":"val Scala3 = \"<SCALA_VERSION>\""}]}
299Parsed config: Success(ProjectBuildConfig(ProjectsConfig(List(),Map()),CompileOnly,List()))
300Starting build...
301Projects: Set(s3, amqp, csv, cassandra, avroparquet, testkit)
302Starting build for ProjectRef(file:/build/repo/,amqp) (akka-stream-alpakka-amqp)... [0/6]
303OpenCB::Exclude Scala3 specific scalacOption `REQUIRE:-source:3.8` in Scala 2.12.20 module Global
304OpenCB::Filter out '-feature', matches setting pattern '^-?-feature'
305OpenCB::Filter out '-deprecation', matches setting pattern '^-?-deprecation'
306Compile scalacOptions: -encoding, UTF-8, -unchecked, -Xlint, -Ywarn-dead-code, --java-output-version:17, 8, -Wconf:cat=deprecation&msg=.*JavaConverters.*:s, -Wconf:msg=can be rewritten automatically under:s, -source:3.8
307[info] compiling 24 Scala sources to /build/repo/amqp/target/scala-3.8.0-RC5/classes ...
308[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
309[warn] bad option '-Ywarn-dead-code' was ignored
310[warn] two warnings found
311[info] done compiling
312[info] compiling 5 Scala sources to /build/repo/testkit/target/scala-3.8.0-RC5/classes ...
313[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
314[warn] bad option '-Ywarn-dead-code' was ignored
315[warn] two warnings found
316[info] done compiling
317[info] compiling 8 Scala sources and 4 Java sources to /build/repo/amqp/target/scala-3.8.0-RC5/test-classes ...
318[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
319[warn] bad option '-Ywarn-dead-code' was ignored
320[warn] two warnings found
321[info] done compiling
322Starting build for ProjectRef(file:/build/repo/,cassandra) (akka-stream-alpakka-cassandra)... [1/6]
323Compile scalacOptions: -encoding, UTF-8, -unchecked, -Xlint, -Ywarn-dead-code, --java-output-version:17, 8, -Wconf:cat=deprecation&msg=.*JavaConverters.*:s, -Wconf:msg=can be rewritten automatically under:s, -source:3.8
324[info] compiling 15 Scala sources to /build/repo/cassandra/target/scala-3.8.0-RC5/classes ...
325[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
326[warn] bad option '-Ywarn-dead-code' was ignored
327[warn] two warnings found
328[info] done compiling
329[info] compiling 7 Scala sources and 3 Java sources to /build/repo/cassandra/target/scala-3.8.0-RC5/test-classes ...
330[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
331[warn] bad option '-Ywarn-dead-code' was ignored
332[warn] two warnings found
333[info] done compiling
334Starting build for ProjectRef(file:/build/repo/,csv) (akka-stream-alpakka-csv)... [2/6]
335Compile scalacOptions: -encoding, UTF-8, -unchecked, -Xlint, -Ywarn-dead-code, --java-output-version:17, 8, -Wconf:cat=deprecation&msg=.*JavaConverters.*:s, -Wconf:msg=can be rewritten automatically under:s, -source:3.8
336[info] compiling 11 Scala sources and 5 Java sources to /build/repo/csv/target/scala-3.8.0-RC5/classes ...
337[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
338[warn] bad option '-Ywarn-dead-code' was ignored
339[warn] two warnings found
340[info] done compiling
341[info] compiling 6 Scala sources and 3 Java sources to /build/repo/csv/target/scala-3.8.0-RC5/test-classes ...
342[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
343[warn] bad option '-Ywarn-dead-code' was ignored
344[warn] two warnings found
345[info] done compiling
346Starting build for ProjectRef(file:/build/repo/,testkit) (akka-stream-alpakka-testkit)... [3/6]
347Compile scalacOptions: -encoding, UTF-8, -unchecked, -Xlint, -Ywarn-dead-code, --java-output-version:17, 8, -Wconf:cat=deprecation&msg=.*JavaConverters.*:s, -Wconf:msg=can be rewritten automatically under:s, -source:3.8
348Starting build for ProjectRef(file:/build/repo/,s3) (akka-stream-alpakka-s3)... [4/6]
349Compile scalacOptions: -encoding, UTF-8, -unchecked, -Xlint, -Ywarn-dead-code, --java-output-version:17, 8, -Wconf:cat=deprecation&msg=.*JavaConverters.*:s, -Wconf:msg=can be rewritten automatically under:s, -source:3.8
350[info] compiling 26 Scala sources to /build/repo/s3/target/scala-3.8.0-RC5/classes ...
351[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
352[warn] bad option '-Ywarn-dead-code' was ignored
353[warn] -- Warning: /build/repo/s3/src/main/scala/akka/stream/alpakka/s3/javadsl/S3.scala:44:6
354[warn] 44 | def request(bucket: String, key: String, method: HttpMethod, s3Headers: S3Headers): Source[HttpResponse, NotUsed] =
355[warn] | ^
356[warn] | Infinite recursive call
357[warn] 45 | request(bucket, key, method, s3Headers)
358[warn] three warnings found
359[info] done compiling
360[info] compiling 24 Scala sources and 1 Java source to /build/repo/s3/target/scala-3.8.0-RC5/test-classes ...
361[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
362[warn] bad option '-Ywarn-dead-code' was ignored
363[warn] two warnings found
364[warn] /build/repo/s3/src/test/java/docs/javadsl/S3Test.java:44:8: akka$testkit$TestKitBase$$queue() in akka.testkit.TestKit implements akka$testkit$TestKitBase$$queue() in akka.testkit.TestKitBase
365[warn] return type requires unchecked conversion from java.util.concurrent.LinkedBlockingDeque to java.util.concurrent.LinkedBlockingDeque<akka.testkit.TestActor.Message>
366[warn] public class S3Test extends S3WireMockBase {
367[warn] @Rule public final LogCapturingJunit4 logCapturing = new LogCapturingJunit4();
368[warn]
369[warn] private static ActorSystem system;
370[warn] private static WireMockServer wireMockServerForShutdown;
371[warn]
372[warn] private final S3Settings sampleSettings = S3Ext.get(system()).settings();
373[warn] private final String prefix = listPrefix();
374[warn] private final String delimiter = listDelimiter();
375[warn]
376[warn] @Before
377[warn] public void before() {
378[warn] wireMockServerForShutdown = _wireMockServer();
379[warn] system = system();
380[warn] }
381[warn]
382[warn] @AfterClass
383[warn] public static void afterAll() throws Exception {
384[warn] wireMockServerForShutdown.stop();
385[warn] Http.get(system)
386[warn] .shutdownAllConnectionPools()
387[warn] .thenRun(() -> TestKit.shutdownActorSystem(system));
388[warn] }
389[warn]
390[warn] @Test
391[warn] public void multipartUpload() throws Exception {
392[warn]
393[warn] mockUpload();
394[warn]
395[warn] // #upload
396[warn] final Source<ByteString, NotUsed> file = Source.single(ByteString.fromString(body()));
397[warn]
398[warn] final Sink<ByteString, CompletionStage<MultipartUploadResult>> sink =
399[warn] S3.multipartUpload(bucket(), bucketKey());
400[warn]
401[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage = file.runWith(sink, system);
402[warn] // #upload
403[warn]
404[warn] MultipartUploadResult result =
405[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
406[warn]
407[warn] assertEquals(
408[warn] MultipartUploadResult.create(
409[warn] Uri.create(url()), bucket(), bucketKey(), etag(), Optional.empty()),
410[warn] result);
411[warn] }
412[warn]
413[warn] @Test
414[warn] public void multipartUploadSSE() throws Exception {
415[warn]
416[warn] mockUploadSSE();
417[warn]
418[warn] final Sink<ByteString, CompletionStage<MultipartUploadResult>> sink =
419[warn] S3.multipartUpload(
420[warn] bucket(),
421[warn] bucketKey(),
422[warn] ContentTypes.APPLICATION_OCTET_STREAM,
423[warn] S3Headers.create().withServerSideEncryption(sseCustomerKeys()));
424[warn]
425[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage =
426[warn] Source.single(ByteString.fromString(body())).runWith(sink, system);
427[warn]
428[warn] MultipartUploadResult result =
429[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
430[warn]
431[warn] assertEquals(
432[warn] MultipartUploadResult.create(
433[warn] Uri.create(url()), bucket(), bucketKey(), etag(), Optional.empty()),
434[warn] result);
435[warn] }
436[warn]
437[warn] @Test
438[warn] public void download() throws Exception {
439[warn]
440[warn] mockDownload();
441[warn]
442[warn] // #download
443[warn] final Source<ByteString, CompletionStage<ObjectMetadata>> s3Source =
444[warn] S3.getObject(bucket(), bucketKey());
445[warn] final Pair<CompletionStage<ObjectMetadata>, CompletionStage<String>> dataAndMetadata =
446[warn] s3Source.map(ByteString::utf8String).toMat(Sink.head(), Keep.both()).run(system);
447[warn]
448[warn] final CompletionStage<ObjectMetadata> metadataCompletionStage = dataAndMetadata.first();
449[warn] final CompletionStage<String> dataCompletionStage = dataAndMetadata.second();
450[warn]
451[warn] // #download
452[warn]
453[warn] // #downloadToAkkaHttp
454[warn] metadataCompletionStage.thenApply(
455[warn] metadata ->
456[warn] HttpResponse.create()
457[warn] .withEntity(
458[warn] HttpEntities.create(
459[warn] metadata
460[warn] .getContentType()
461[warn] .map(ContentTypes::parse)
462[warn] .orElse(ContentTypes.APPLICATION_OCTET_STREAM),
463[warn] metadata.getContentLength(),
464[warn] s3Source)));
465[warn] // #downloadToAkkaHttp
466[warn]
467[warn] String result = dataCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
468[warn] ObjectMetadata metadata =
469[warn] metadataCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
470[warn]
471[warn] System.out.println("#####");
472[warn] System.out.println(metadata.getContentLength());
473[warn]
474[warn] assertEquals(body(), result);
475[warn] }
476[warn]
477[warn] @Test
478[warn] public void head() throws Exception {
479[warn]
480[warn] long contentLength = 8L;
481[warn] mockHead(contentLength);
482[warn]
483[warn] // #objectMetadata
484[warn] final Source<Optional<ObjectMetadata>, NotUsed> source =
485[warn] S3.getObjectMetadata(bucket(), bucketKey());
486[warn] // #objectMetadata
487[warn]
488[warn] Optional<ObjectMetadata> result =
489[warn] source.runWith(Sink.head(), system).toCompletableFuture().get(5, TimeUnit.SECONDS);
490[warn]
491[warn] final ObjectMetadata objectMetadata = result.get();
492[warn] Optional<String> s3eTag = objectMetadata.getETag();
493[warn] long actualContentLength = objectMetadata.getContentLength();
494[warn] Optional<String> versionId = objectMetadata.getVersionId();
495[warn]
496[warn] assertEquals(s3eTag, Optional.of(etag()));
497[warn] assertEquals(actualContentLength, contentLength);
498[warn] assertEquals(versionId, Optional.empty());
499[warn] }
500[warn]
501[warn] @Test
502[warn] public void headWithVersion() throws Exception {
503[warn] String versionId = "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo";
504[warn] mockHeadWithVersion(versionId);
505[warn]
506[warn] final Source<Optional<ObjectMetadata>, NotUsed> source =
507[warn] S3.getObjectMetadata(bucket(), bucketKey(), Optional.of(versionId), null);
508[warn]
509[warn] Optional<ObjectMetadata> result =
510[warn] source.runWith(Sink.head(), system).toCompletableFuture().get(5, TimeUnit.SECONDS);
511[warn]
512[warn] final ObjectMetadata objectMetadata = result.get();
513[warn] Optional<String> s3eTag = objectMetadata.getETag();
514[warn] Optional<String> metadataVersionId = objectMetadata.getVersionId();
515[warn]
516[warn] assertEquals(s3eTag, Optional.of(etag()));
517[warn] assertEquals(metadataVersionId, Optional.of(versionId));
518[warn] }
519[warn]
520[warn] @Test
521[warn] public void headServerSideEncryption() throws Exception {
522[warn] mockHeadSSEC();
523[warn]
524[warn] final Source<Optional<ObjectMetadata>, NotUsed> source =
525[warn] S3.getObjectMetadata(bucket(), bucketKey(), sseCustomerKeys());
526[warn]
527[warn] Optional<ObjectMetadata> result =
528[warn] source.runWith(Sink.head(), system).toCompletableFuture().get(5, TimeUnit.SECONDS);
529[warn]
530[warn] Optional<String> etag = result.get().getETag();
531[warn]
532[warn] assertEquals(etag, Optional.of(etagSSE()));
533[warn] }
534[warn]
535[warn] @Test
536[warn] public void downloadServerSideEncryption() throws Exception {
537[warn] mockDownloadSSEC();
538[warn]
539[warn] final Source<ByteString, CompletionStage<ObjectMetadata>> s3Source =
540[warn] S3.getObject(bucket(), bucketKey(), sseCustomerKeys());
541[warn]
542[warn] final CompletionStage<String> resultCompletionStage =
543[warn] s3Source.map(ByteString::utf8String).runWith(Sink.head(), system);
544[warn]
545[warn] String result = resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
546[warn]
547[warn] assertEquals(bodySSE(), result);
548[warn] }
549[warn]
550[warn] @Test
551[warn] public void downloadServerSideEncryptionWithVersion() throws Exception {
552[warn] String versionId = "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo";
553[warn] mockDownloadSSECWithVersion(versionId);
554[warn]
555[warn] final Source<ByteString, CompletionStage<ObjectMetadata>> s3Source =
556[warn] S3.getObject(bucket(), bucketKey(), null, Optional.of(versionId), sseCustomerKeys());
557[warn]
558[warn] final Pair<CompletionStage<ObjectMetadata>, CompletionStage<String>> p =
559[warn] s3Source.map(ByteString::utf8String).toMat(Sink.head(), Keep.both()).run(system);
560[warn]
561[warn] final CompletionStage<String> resultCompletionStage = p.second();
562[warn] final String result = resultCompletionStage.toCompletableFuture().get(2, TimeUnit.SECONDS);
563[warn] assertEquals(bodySSE(), result);
564[warn]
565[warn] final ObjectMetadata metadata = p.first().toCompletableFuture().get(2, TimeUnit.SECONDS);
566[warn] assertEquals(Optional.of(versionId), metadata.getVersionId());
567[warn] }
568[warn]
569[warn] @Test
570[warn] public void rangedDownload() throws Exception {
571[warn]
572[warn] mockRangedDownload();
573[warn]
574[warn] // #rangedDownload
575[warn] final Source<ByteString, CompletionStage<ObjectMetadata>> sourceAndMeta =
576[warn] S3.getObject(
577[warn] bucket(), bucketKey(), ByteRange.createSlice(bytesRangeStart(), bytesRangeEnd()));
578[warn] // #rangedDownload
579[warn]
580[warn] final CompletionStage<byte[]> resultCompletionStage =
581[warn] sourceAndMeta.map(ByteString::toArray).runWith(Sink.head(), system);
582[warn]
583[warn] byte[] result = resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
584[warn]
585[warn] assertTrue(Arrays.equals(rangeOfBody(), result));
586[warn] }
587[warn]
588[warn] @Test
589[warn] public void rangedDownloadServerSideEncryption() throws Exception {
590[warn]
591[warn] mockRangedDownloadSSE();
592[warn]
593[warn] final Source<ByteString, CompletionStage<ObjectMetadata>> sourceAndMeta =
594[warn] S3.getObject(
595[warn] bucket(),
596[warn] bucketKey(),
597[warn] ByteRange.createSlice(bytesRangeStart(), bytesRangeEnd()),
598[warn] sseCustomerKeys());
599[warn]
600[warn] final CompletionStage<byte[]> resultCompletionStage =
601[warn] sourceAndMeta.map(ByteString::toArray).runWith(Sink.head(), system);
602[warn]
603[warn] byte[] result = resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
604[warn]
605[warn] assertTrue(Arrays.equals(rangeOfBodySSE(), result));
606[warn] }
607[warn]
608[warn] @Test
609[warn] public void listBucket() throws Exception {
610[warn]
611[warn] mockListBucket();
612[warn]
613[warn] // #list-bucket
614[warn] final Source<ListBucketResultContents, NotUsed> keySource =
615[warn] S3.listBucket(bucket(), Optional.of(prefix));
616[warn] // #list-bucket
617[warn]
618[warn] final CompletionStage<ListBucketResultContents> resultCompletionStage =
619[warn] keySource.runWith(Sink.head(), system);
620[warn]
621[warn] ListBucketResultContents result =
622[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
623[warn]
624[warn] assertEquals(result.key(), listKey());
625[warn] }
626[warn]
627[warn] @Test
628[warn] public void listBucketVersion1() throws Exception {
629[warn] mockListBucketVersion1();
630[warn]
631[warn] // #list-bucket-attributes
632[warn] final S3Settings useVersion1Api =
633[warn] S3Ext.get(system()).settings().withListBucketApiVersion(ApiVersion.getListBucketVersion1());
634[warn]
635[warn] final Source<ListBucketResultContents, NotUsed> keySource =
636[warn] S3.listBucket(bucket(), Optional.of(prefix))
637[warn] .withAttributes(S3Attributes.settings(useVersion1Api));
638[warn] // #list-bucket-attributes
639[warn]
640[warn] final CompletionStage<ListBucketResultContents> resultCompletionStage =
641[warn] keySource.runWith(Sink.head(), system);
642[warn]
643[warn] ListBucketResultContents result =
644[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
645[warn]
646[warn] assertEquals(result.key(), listKey());
647[warn] }
648[warn]
649[warn] @Test
650[warn] public void listBucketWithDelimiter() throws Exception {
651[warn]
652[warn] mockListBucketAndCommonPrefixes();
653[warn]
654[warn] // #list-bucket-delimiter
655[warn] final Source<ListBucketResultContents, NotUsed> keySource =
656[warn] S3.listBucket(bucket(), delimiter, Optional.of(prefix));
657[warn] // #list-bucket-delimiter
658[warn]
659[warn] final CompletionStage<ListBucketResultContents> resultCompletionStage =
660[warn] keySource.runWith(Sink.head(), system);
661[warn]
662[warn] ListBucketResultContents result =
663[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
664[warn]
665[warn] assertEquals(result.key(), listKey());
666[warn] }
667[warn]
668[warn] @Test
669[warn] public void listBucketAndCommonPrefixes() throws Exception {
670[warn]
671[warn] mockListBucketAndCommonPrefixes();
672[warn]
673[warn] // #list-bucket-and-common-prefixes
674[warn] final Source<
675[warn] Pair<List<ListBucketResultContents>, List<ListBucketResultCommonPrefixes>>, NotUsed>
676[warn] keySource =
677[warn] S3.listBucketAndCommonPrefixes(
678[warn] bucket(), delimiter, Optional.of(prefix), S3Headers.empty());
679[warn] // #list-bucket-and-common-prefixes
680[warn]
681[warn] final CompletionStage<
682[warn] List<Pair<List<ListBucketResultContents>, List<ListBucketResultCommonPrefixes>>>>
683[warn] resultsCompletionStage = keySource.runWith(Sink.seq(), system);
684[warn]
685[warn] final List<Pair<List<ListBucketResultContents>, List<ListBucketResultCommonPrefixes>>> results =
686[warn] resultsCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
687[warn]
688[warn] final List<ListBucketResultContents> contents = results.get(0).first();
689[warn] final List<ListBucketResultCommonPrefixes> commonPrefixes = results.get(0).second();
690[warn]
691[warn] assertEquals(contents.get(0).key(), listKey());
692[warn] assertEquals(commonPrefixes.get(0).prefix(), listCommonPrefix());
693[warn] }
694[warn]
695[warn] @Test
696[warn] public void listBucketAndCommonPrefixesVersion1() throws Exception {
697[warn] mockListBucketAndCommonPrefixesVersion1();
698[warn]
699[warn] // #list-bucket-and-common-prefixes-attributes
700[warn] final S3Settings useVersion1Api =
701[warn] S3Ext.get(system()).settings().withListBucketApiVersion(ApiVersion.getListBucketVersion1());
702[warn]
703[warn] final Source<
704[warn] Pair<List<ListBucketResultContents>, List<ListBucketResultCommonPrefixes>>, NotUsed>
705[warn] keySource =
706[warn] S3.listBucketAndCommonPrefixes(
707[warn] bucket(), delimiter, Optional.of(prefix), S3Headers.empty())
708[warn] .withAttributes(S3Attributes.settings(useVersion1Api));
709[warn] // #list-bucket-and-common-prefixes-attributes
710[warn]
711[warn] final CompletionStage<
712[warn] List<Pair<List<ListBucketResultContents>, List<ListBucketResultCommonPrefixes>>>>
713[warn] resultsCompletionStage = keySource.runWith(Sink.seq(), system);
714[warn]
715[warn] final List<Pair<List<ListBucketResultContents>, List<ListBucketResultCommonPrefixes>>> results =
716[warn] resultsCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
717[warn]
718[warn] final List<ListBucketResultContents> contents = results.get(0).first();
719[warn] final List<ListBucketResultCommonPrefixes> commonPrefixes = results.get(0).second();
720[warn]
721[warn] assertEquals(contents.get(0).key(), listKey());
722[warn] assertEquals(commonPrefixes.get(0).prefix(), listCommonPrefix());
723[warn] }
724[warn]
725[warn] @Test
726[warn] public void copyUploadWithContentLengthLessThenChunkSize() throws Exception {
727[warn] mockCopy();
728[warn]
729[warn] String bucket = bucket();
730[warn] String sourceKey = bucketKey();
731[warn] String targetBucket = targetBucket();
732[warn] String targetKey = targetBucketKey();
733[warn] // #multipart-copy
734[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage =
735[warn] S3.multipartCopy(bucket, sourceKey, targetBucket, targetKey).run(system);
736[warn] // #multipart-copy
737[warn]
738[warn] final MultipartUploadResult result =
739[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
740[warn]
741[warn] assertEquals(
742[warn] result,
743[warn] MultipartUploadResult.create(
744[warn] Uri.create(targetUrl()), targetBucket(), targetBucketKey(), etag(), Optional.empty()));
745[warn] }
746[warn]
747[warn] @Test
748[warn] public void copyUploadWithSourceVersion() throws Exception {
749[warn] mockCopyVersioned();
750[warn]
751[warn] String bucket = bucket();
752[warn] String sourceKey = bucketKey();
753[warn] String targetBucket = targetBucket();
754[warn] String targetKey = targetBucketKey();
755[warn]
756[warn] // #multipart-copy-with-source-version
757[warn] String sourceVersionId = "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo";
758[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage =
759[warn] S3.multipartCopy(
760[warn] bucket,
761[warn] sourceKey,
762[warn] targetBucket,
763[warn] targetKey,
764[warn] Optional.of(sourceVersionId),
765[warn] S3Headers.create())
766[warn] .run(system);
767[warn] // #multipart-copy-with-source-version
768[warn]
769[warn] final MultipartUploadResult result =
770[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
771[warn]
772[warn] assertEquals(
773[warn] result,
774[warn] MultipartUploadResult.create(
775[warn] Uri.create(targetUrl()),
776[warn] targetBucket(),
777[warn] targetBucketKey(),
778[warn] etag(),
779[warn] Optional.of("43jfkodU8493jnFJD9fjj3HHNVfdsQUIFDNsidf038jfdsjGFDSIRp")));
780[warn] }
781[warn]
782[warn] @Test
783[warn] public void copyUploadWithContentLengthEqualToChunkSize() throws Exception {
784[warn] mockCopy(5242880);
785[warn]
786[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage =
787[warn] S3.multipartCopy(bucket(), bucketKey(), targetBucket(), targetBucketKey()).run(system);
788[warn] final MultipartUploadResult result =
789[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
790[warn]
791[warn] assertEquals(
792[warn] result,
793[warn] MultipartUploadResult.create(
794[warn] Uri.create(targetUrl()), targetBucket(), targetBucketKey(), etag(), Optional.empty()));
795[warn] }
796[warn]
797[warn] @Test
798[warn] public void copyUploadWithContentLengthGreaterThenChunkSize() throws Exception {
799[warn] mockCopyMulti();
800[warn]
801[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage =
802[warn] S3.multipartCopy(bucket(), bucketKey(), targetBucket(), targetBucketKey()).run(system);
803[warn] final MultipartUploadResult result =
804[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
805[warn]
806[warn] assertEquals(
807[warn] result,
808[warn] MultipartUploadResult.create(
809[warn] Uri.create(targetUrl()), targetBucket(), targetBucketKey(), etag(), Optional.empty()));
810[warn] }
811[warn]
812[warn] @Test
813[warn] public void copyUploadEmptyFile() throws Exception {
814[warn] mockCopy(0);
815[warn]
816[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage =
817[warn] S3.multipartCopy(bucket(), bucketKey(), targetBucket(), targetBucketKey()).run(system);
818[warn] final MultipartUploadResult result =
819[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
820[warn]
821[warn] assertEquals(
822[warn] result,
823[warn] MultipartUploadResult.create(
824[warn] Uri.create(targetUrl()), targetBucket(), targetBucketKey(), etag(), Optional.empty()));
825[warn] }
826[warn]
827[warn] @Test
828[warn] public void copyUploadWithSSE() throws Exception {
829[warn] mockCopySSE();
830[warn]
831[warn] // #multipart-copy-sse
832[warn] final CustomerKeys keys =
833[warn] ServerSideEncryption.customerKeys(sseCustomerKey()).withMd5(sseCustomerMd5Key());
834[warn]
835[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage =
836[warn] S3.multipartCopy(
837[warn] bucket(),
838[warn] bucketKey(),
839[warn] targetBucket(),
840[warn] targetBucketKey(),
841[warn] S3Headers.create().withServerSideEncryption(keys))
842[warn] .run(system);
843[warn] // #multipart-copy-sse
844[warn]
845[warn] final MultipartUploadResult result =
846[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
847[warn]
848[warn] assertEquals(
849[warn] result,
850[warn] MultipartUploadResult.create(
851[warn] Uri.create(targetUrl()), targetBucket(), targetBucketKey(), etag(), Optional.empty()));
852[warn] }
853[warn]
854[warn] @Test
855[warn] public void copyUploadWithCustomHeader() throws Exception {
856[warn] mockCopy();
857[warn]
858[warn] final CompletionStage<MultipartUploadResult> resultCompletionStage =
859[warn] S3.multipartCopy(
860[warn] bucket(),
861[warn] bucketKey(),
862[warn] targetBucket(),
863[warn] targetBucketKey(),
864[warn] S3Headers.create().withServerSideEncryption(ServerSideEncryption.aes256()))
865[warn] .run(system);
866[warn]
867[warn] final MultipartUploadResult result =
868[warn] resultCompletionStage.toCompletableFuture().get(5, TimeUnit.SECONDS);
869[warn]
870[warn] assertEquals(
871[warn] result,
872[warn] MultipartUploadResult.create(
873[warn] Uri.create(targetUrl()), targetBucket(), targetBucketKey(), etag(), Optional.empty()));
874[warn] }
875[warn]
876[warn] @Test
877[warn] public void makeBucket() throws Exception {
878[warn] mockMakingBucket();
879[warn]
880[warn] // #make-bucket
881[warn] final Attributes sampleAttributes = S3Attributes.settings(sampleSettings);
882[warn]
883[warn] final String bucketName = "samplebucket1";
884[warn]
885[warn] CompletionStage<Done> makeBucketRequest = S3.makeBucket(bucketName, system);
886[warn] CompletionStage<Done> makeBucketRequestWithAttributes =
887[warn] S3.makeBucket(bucketName, system, sampleAttributes);
888[warn] Source<Done, NotUsed> makeBucketSourceRequest = S3.makeBucketSource(bucketName);
889[warn] // #make-bucket
890[warn]
891[warn] assertEquals(makeBucketRequest.toCompletableFuture().get(5, TimeUnit.SECONDS), Done.done());
892[warn] assertEquals(
893[warn] makeBucketRequestWithAttributes.toCompletableFuture().get(5, TimeUnit.SECONDS),
894[warn] Done.done());
895[warn] assertEquals(
896[warn] makeBucketSourceRequest
897[warn] .runWith(Sink.ignore(), system)
898[warn] .toCompletableFuture()
899[warn] .get(5, TimeUnit.SECONDS),
900[warn] Done.done());
901[warn] }
902[warn]
903[warn] @Test
904[warn] public void deleteBucket() throws Exception {
905[warn] final String bucketName = "samplebucket1";
906[warn]
907[warn] mockDeletingBucket();
908[warn]
909[warn] // #delete-bucket
910[warn] final Attributes sampleAttributes = S3Attributes.settings(sampleSettings);
911[warn]
912[warn] CompletionStage<Done> deleteBucketRequest = S3.deleteBucket(bucketName, system);
913[warn] CompletionStage<Done> deleteBucketRequestWithAttribues =
914[warn] S3.deleteBucket(bucketName, system, sampleAttributes);
915[warn]
916[warn] Source<Done, NotUsed> deleteBucketSourceRequest = S3.deleteBucketSource(bucketName);
917[warn] // #delete-bucket
918[warn]
919[warn] assertEquals(deleteBucketRequest.toCompletableFuture().get(5, TimeUnit.SECONDS), Done.done());
920[warn]
921[warn] assertEquals(
922[warn] deleteBucketRequestWithAttribues.toCompletableFuture().get(5, TimeUnit.SECONDS),
923[warn] Done.done());
924[warn]
925[warn] assertEquals(
926[warn] deleteBucketSourceRequest
927[warn] .runWith(Sink.ignore(), system)
928[warn] .toCompletableFuture()
929[warn] .get(5, TimeUnit.SECONDS),
930[warn] Done.done());
931[warn] }
932[warn]
933[warn] @Test
934[warn] public void checkIfBucketExistsForNonExisting() throws Exception {
935[warn] mockCheckingBucketStateForNonExistingBucket();
936[warn]
937[warn] // #check-if-bucket-exists
938[warn] final Attributes sampleAttributes = S3Attributes.settings(sampleSettings);
939[warn]
940[warn] final CompletionStage<BucketAccess> doesntExistRequest =
941[warn] S3.checkIfBucketExists(bucket(), system);
942[warn] final CompletionStage<BucketAccess> doesntExistRequestWithAttributes =
943[warn] S3.checkIfBucketExists(bucket(), system, sampleAttributes);
944[warn]
945[warn] final Source<BucketAccess, NotUsed> doesntExistSourceRequest =
946[warn] S3.checkIfBucketExistsSource(bucket());
947[warn] // #check-if-bucket-exists
948[warn]
949[warn] assertEquals(
950[warn] doesntExistRequest.toCompletableFuture().get(5, TimeUnit.SECONDS),
951[warn] BucketAccess.notExists());
952[warn]
953[warn] assertEquals(
954[warn] doesntExistRequestWithAttributes.toCompletableFuture().get(5, TimeUnit.SECONDS),
955[warn] BucketAccess.notExists());
956[warn]
957[warn] assertEquals(
958[warn] doesntExistSourceRequest
959[warn] .runWith(Sink.head(), system)
960[warn] .toCompletableFuture()
961[warn] .get(5, TimeUnit.SECONDS),
962[warn] BucketAccess.notExists());
963[warn] }
964[warn]
965[warn] @Test
966[warn] public void checkIfBucketExistsForExisting() throws Exception {
967[warn] mockCheckingBucketStateForExistingBucket();
968[warn]
969[warn] final CompletionStage<BucketAccess> existRequest = S3.checkIfBucketExists(bucket(), system);
970[warn]
971[warn] final Source<BucketAccess, NotUsed> existSourceRequest = S3.checkIfBucketExistsSource(bucket());
972[warn]
973[warn] assertEquals(
974[warn] existRequest.toCompletableFuture().get(5, TimeUnit.SECONDS), BucketAccess.accessGranted());
975[warn]
976[warn] assertEquals(
977[warn] existSourceRequest
978[warn] .runWith(Sink.head(), system)
979[warn] .toCompletableFuture()
980[warn] .get(5, TimeUnit.SECONDS),
981[warn] BucketAccess.accessGranted());
982[warn] }
983[warn]
984[warn] @Test
985[warn] public void checkIfBucketExistsForBucketWithoutRights() throws Exception {
986[warn] mockCheckingBucketStateForBucketWithoutRights();
987[warn]
988[warn] final CompletionStage<BucketAccess> noRightsRequest = S3.checkIfBucketExists(bucket(), system);
989[warn]
990[warn] final Source<BucketAccess, NotUsed> noRightsSourceRequest =
991[warn] S3.checkIfBucketExistsSource(bucket());
992[warn]
993[warn] assertEquals(
994[warn] noRightsRequest.toCompletableFuture().get(5, TimeUnit.SECONDS),
995[warn] BucketAccess.accessDenied());
996[warn]
997[warn] assertEquals(
998[warn] noRightsSourceRequest
999[warn] .runWith(Sink.head(), system)
1000[warn] .toCompletableFuture()
1001[warn] .get(5, TimeUnit.SECONDS),
1002[warn] BucketAccess.accessDenied());
1003[warn] }
1004[warn] }
1005[warn] ^
1006[info] done compiling
1007Starting build for ProjectRef(file:/build/repo/,avroparquet) (akka-stream-alpakka-avroparquet)... [5/6]
1008Compile scalacOptions: -encoding, UTF-8, -unchecked, -Xlint, -Ywarn-dead-code, --java-output-version:17, 8, -Wconf:cat=deprecation&msg=.*JavaConverters.*:s, -Wconf:msg=can be rewritten automatically under:s, -source:3.8
1009[info] compiling 8 Scala sources to /build/repo/avroparquet/target/scala-3.8.0-RC5/classes ...
1010[warn] Option -Xlint is deprecated: Use -Wshadow to enable shadowing lints. Scheduled for removal.
1011[warn] bad option '-Ywarn-dead-code' was ignored
1012[warn] two warnings found
1013[info] done compiling
1014
1015************************
1016Build summary:
1017[{
1018 "module": "akka-stream-alpakka-amqp",
1019 "compile": {"status": "ok", "tookMs": 8490, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1020 "doc": {"status": "skipped", "tookMs": 0, "files": 0, "totalSizeKb": 0},
1021 "test-compile": {"status": "ok", "tookMs": 8552, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1022 "test": {"status": "skipped", "tookMs": 0, "passed": 0, "failed": 0, "ignored": 0, "skipped": 0, "total": 0, "byFramework": []},
1023 "publish": {"status": "skipped", "tookMs": 0},
1024 "metadata": {
1025 "crossScalaVersions": ["2.13.10", "2.12.17", "3.2.2"]
1026}
1027},{
1028 "module": "akka-stream-alpakka-cassandra",
1029 "compile": {"status": "ok", "tookMs": 1710, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1030 "doc": {"status": "skipped", "tookMs": 0, "files": 0, "totalSizeKb": 0},
1031 "test-compile": {"status": "ok", "tookMs": 4068, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1032 "test": {"status": "skipped", "tookMs": 0, "passed": 0, "failed": 0, "ignored": 0, "skipped": 0, "total": 0, "byFramework": []},
1033 "publish": {"status": "skipped", "tookMs": 0},
1034 "metadata": {
1035 "crossScalaVersions": ["2.13.10", "2.12.17", "3.2.2"]
1036}
1037},{
1038 "module": "akka-stream-alpakka-csv",
1039 "compile": {"status": "ok", "tookMs": 1478, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1040 "doc": {"status": "skipped", "tookMs": 0, "files": 0, "totalSizeKb": 0},
1041 "test-compile": {"status": "ok", "tookMs": 4034, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1042 "test": {"status": "skipped", "tookMs": 0, "passed": 0, "failed": 0, "ignored": 0, "skipped": 0, "total": 0, "byFramework": []},
1043 "publish": {"status": "skipped", "tookMs": 0},
1044 "metadata": {
1045 "crossScalaVersions": ["2.13.10", "2.12.17", "3.2.2"]
1046}
1047},{
1048 "module": "akka-stream-alpakka-testkit",
1049 "compile": {"status": "ok", "tookMs": 70, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1050 "doc": {"status": "skipped", "tookMs": 0, "files": 0, "totalSizeKb": 0},
1051 "test-compile": {"status": "ok", "tookMs": 150, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1052 "test": {"status": "skipped", "tookMs": 0, "passed": 0, "failed": 0, "ignored": 0, "skipped": 0, "total": 0, "byFramework": []},
1053 "publish": {"status": "ok", "tookMs": 5},
1054 "metadata": {
1055 "crossScalaVersions": ["2.13.10", "2.12.17", "3.2.2"]
1056}
1057},{
1058 "module": "akka-stream-alpakka-s3",
1059 "compile": {"status": "ok", "tookMs": 5818, "warnings": 1, "errors": 0, "sourceVersion": "3.8"},
1060 "doc": {"status": "skipped", "tookMs": 0, "files": 0, "totalSizeKb": 0},
1061 "test-compile": {"status": "ok", "tookMs": 8715, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1062 "test": {"status": "skipped", "tookMs": 0, "passed": 0, "failed": 0, "ignored": 0, "skipped": 0, "total": 0, "byFramework": []},
1063 "publish": {"status": "skipped", "tookMs": 0},
1064 "metadata": {
1065 "crossScalaVersions": ["2.13.10", "2.12.17", "3.2.2"]
1066}
1067},{
1068 "module": "akka-stream-alpakka-avroparquet",
1069 "compile": {"status": "ok", "tookMs": 481, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1070 "doc": {"status": "skipped", "tookMs": 0, "files": 0, "totalSizeKb": 0},
1071 "test-compile": {"status": "ok", "tookMs": 183, "warnings": 0, "errors": 0, "sourceVersion": "3.8"},
1072 "test": {"status": "skipped", "tookMs": 0, "passed": 0, "failed": 0, "ignored": 0, "skipped": 0, "total": 0, "byFramework": []},
1073 "publish": {"status": "skipped", "tookMs": 0},
1074 "metadata": {
1075 "crossScalaVersions": ["2.13.10", "2.12.17", "3.2.2"]
1076}
1077}]
1078************************
1079[success] Total time: 56 s, completed Dec 31, 2025, 9:11:37 PM
1080[0JChecking patch project/plugins.sbt...
1081Checking patch project/build.properties...
1082Checking patch project/Dependencies.scala...
1083Checking patch build.sbt...
1084Applied patch project/plugins.sbt cleanly.
1085Applied patch project/build.properties cleanly.
1086Applied patch project/Dependencies.scala cleanly.
1087Applied patch build.sbt cleanly.