Build Logs

akka/alpakka • 3.7.4:2025-11-06

Errors

28

Warnings

656

Total Lines

1088

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