Skip to content

Serve push notification test image from MockWebServer - #1097

Open
franco-zalamena-iterable wants to merge 2 commits into
masterfrom
fix/notification-image-test-hermetic
Open

franco-zalamena-iterable wants to merge 2 commits into
masterfrom
fix/notification-image-test-hermetic

Conversation

@franco-zalamena-iterable

@franco-zalamena-iterable franco-zalamena-iterable commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixing test failing on CI

No customer facing changes

testNotificationImage pointed attachment-url at a live logo on
assets.iterable.com. That asset now returns 404, so getInputStream()
throws, no BigPictureStyle is attached, and the EXTRA_PICTURE assertion
fails on every branch including master. Serve the existing 350x150.png
test resource locally instead so the test no longer depends on a CDN.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@franco-zalamena-iterable
franco-zalamena-iterable requested a review from a team as a code owner September 23, 2026 11:33
IterableRequestTask resolves the endpoint from a static override on every
attempt and schedules retries on a static main-looper Handler up to
RETRY_DELAY_MS * MAX_RETRY_COUNT ahead. testResponseCode500 asserted that
retry #2 happened and returned, leaving retries 3-5 pending; those fired
after tearDown and re-resolved to the next test's MockWebServer, consuming
the response it had enqueued. The default queue dispatcher blocks on an
empty queue, so the victim hung until its latch timed out - usually
testResponseCode400WithoutMessage - and a stray response reaching a
finished test's assertion in a callback crashed the instrumentation process.

Serve responses from a dispatcher that repeats the last scripted response
so a stray request is harmless, and end the 500 retry chain with a success
so it cannot outlive the test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant