GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp
GcsStreamingMessageSourceTests is flaky
- Dominant language
- Java
- Stars
- 551
- Forks
- 349
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
This test is part of unit tests, in a recent PR, it failed for JDK 17 and 21. succeeded on 2nd retry.
log from failed run: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/actions/runs/15304484958/job/43057583803?pr=3825
```
Error: Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.835 s <<< FAILURE! -- in com.google.cloud.spring.storage.integration.inbound.GcsStreamingMessageSourceTests
Error: com.google.cloud.spring.storage.integration.inbound.GcsStreamingMessageSourceTests.testInboundStreamingChannelAdapter -- Time elapsed: 0.075 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: null
but was: GenericMessage [payload=sun.nio.ch.ChannelInputStream@5bb911c1, headers={file_remoteHostPort=storage.googleapis.com:443, file_remoteFileInfo={"directory":false,"filename":"gamma","link":false,"modified":"Cannot invoke "java.time.OffsetDateTime.toInstant()" because the return value of "com.google.cloud.storage.BlobInfo.getUpdateTimeOffsetDateTime()" is null","permissions":"Use [BlobInfo.getAcl()] to obtain permissions.","remoteDirectory":"gcsbucket","size":0}, file_remoteDirectory=gcsbucket, id=9ee0b9c2-b03a-745d-a410-e6bcfe51e737, closeableResource=com.google.cloud.spring.storage.integration.GcsSession@6a55594b, file_remoteFile=gamma, timestamp=1748447264631}]
at com.google.cloud.spring.storage.integration.inbound.GcsStreamingMessageSourceTests.testInboundStreamingChannelAdapter(GcsStreamingMessageSourceTests.java:78)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
````
Contributor guide
Research direction
Start with GcsStreamingMessageSourceTests.java at line 78 and inspect testInboundStreamingChannelAdapter alongside the linked failed-run log. Reproduce the test on JDK 17 and 21, then identify why the assertion differs between runs. Done means the test passes reliably without retries on the affected JDK versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, java
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100