Skip to content

Conversation

@twometresteve
Copy link
Contributor

@twometresteve twometresteve commented Oct 30, 2025

Goal

Moves the e2e test fixture to the idempotent commands pattern.

Design

The thrust of the change should be familiar from the bugsnag-android-performance fixture that already uses idempotent commands. The new /idem-command endpoint that only supports idempotent commands is used as the functionality will eventually be removed from the /command endpoint.

Changeset

New PersistentData class created to factor code out of the MainActivity and avoid static analysis failures (we could do more here in time).

Whilst implementing the change and, in particular, running the tests several times with additional logging I made some additional changes to reduce test flakes:

  • CONFIG_FILE_TIMEOUT increased as sometimes the file was not found in time. Further resilience may be needed in this area in future.
  • onCreate now records whether the activity is being recreated and prevents a new command runner from being started if that's the case. Thanks to extra logging I found that a second thread was being created, causing the same command to be run more than once and tests to fail. The existing polling flag was not sufficient as a new object must be instantiated causing it to be false (in hindsight I could have tried making it static).

Testing

Covered by a full CI run.

@bugsnagbot
Copy link
Collaborator

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1837.82 1603.07
arm64_v8a 647.43 409.86
armeabi_v7a 590.09 352.52
x86 721.14 483.57
x86_64 692.47 454.9

Generated by 🚫 Danger

@twometresteve twometresteve requested a review from lemnik October 30, 2025 10:51
Copy link
Contributor

@lemnik lemnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a tiny naming suggestion

@twometresteve twometresteve merged commit 321e816 into next Oct 30, 2025
76 checks passed
@twometresteve twometresteve deleted the tms/idem-commands branch October 30, 2025 16:25
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.

4 participants