ably / ably-asset-tracking-android

Android client SDKs for the Ably Asset Tracking service.
Apache License 2.0
13 stars 6 forks source link

Flakey test: com.ably.tracking.tests.PublisherAndSubscriberTests > createAndStartPublisherAndSubscriberAndWaitUntilDataEnds #954

Open AndyTWF opened 1 year ago

AndyTWF commented 1 year ago
com.ably.tracking.tests.PublisherAndSubscriberTests > createAndStartPublisherAndSubscriberAndWaitUntilDataEnds[test(AVD) - 5.0.2] FAILED 
    java.lang.AssertionError: Received Subscriber location should be equal to published Publisher location (index 1) expected:<com.ably.tracking.EnhancedLocationUpdate@5b8b7fec> but was:<com.ably.tracking.EnhancedLocationUpdate@dbdfc939>

First noticed in https://github.com/ably/ably-asset-tracking-android/actions/runs/4017396909/jobs/6901700322

This is most likely caused by EnhancedLocationChangedWorker: it emits every enhanced location updated on the publishers locations flow, but what reaches the subscriber via Ably is controlled by other factors, namely the subscriber resolution. The test is performed by comparing the publisher locations flow (absolutely everything) and the subscribers flow (only what gets sent over Ably). These two cannot be reliably compared.

This could be fixed by addressing https://github.com/ably/ably-asset-tracking-android/issues/913

sync-by-unito[bot] commented 1 year ago

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3284