diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 04:02:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 04:02:43 +0000 |
commit | 8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd (patch) | |
tree | 16a27151176f80644677f4007d17dbd5f4d0f204 /mobile/android/android-components | |
parent | Releasing progress-linux version 127.0-1~progress7.99u1. (diff) | |
download | firefox-8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd.tar.xz firefox-8ef7f43d9d880ce1c7da687c3c0bf2caf44bcbcd.zip |
Merging upstream version 127.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/android-components')
2 files changed, 8 insertions, 23 deletions
diff --git a/mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt b/mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt index b30f8b0f4b..9784d9e79e 100644 --- a/mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt +++ b/mobile/android/android-components/components/feature/fxsuggest/src/main/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorker.kt @@ -22,16 +22,10 @@ internal class FxSuggestIngestionWorker( private val logger = Logger("FxSuggestIngestionWorker") override suspend fun doWork(): Result { - logger.info("Ingesting new suggestions") - val storage = GlobalFxSuggestDependencyProvider.requireStorage() - val success = storage.ingest() - return if (success) { - logger.info("Successfully ingested new suggestions") - Result.success() - } else { - logger.error("Failed to ingest new suggestions") - Result.retry() - } + // Disable periodic ingestion until we figure out + // https://bugzilla.mozilla.org/show_bug.cgi?id=1900837 + logger.info("Skipping ingesting new suggestions") + return Result.success() } internal companion object { diff --git a/mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt b/mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt index 84df98f78e..54c1e1dd67 100644 --- a/mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt +++ b/mobile/android/android-components/components/feature/fxsuggest/src/test/java/mozilla/components/feature/fxsuggest/FxSuggestIngestionWorkerTest.kt @@ -18,6 +18,7 @@ import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test import org.junit.runner.RunWith +import org.mockito.Mockito.never import org.mockito.Mockito.verify @RunWith(AndroidJUnit4::class) @@ -43,19 +44,9 @@ class FxSuggestIngestionWorkerTest { val result = worker.startWork().await() - verify(storage).ingest(any()) + // Ingestion is disabled until we figure out + // https://bugzilla.mozilla.org/show_bug.cgi?id=1900837 + verify(storage, never()).ingest(any()) assertEquals(ListenableWorker.Result.success(), result) } - - @Test - fun workShouldRetry() = runTest { - whenever(storage.ingest(any())).thenReturn(false) - - val worker = TestListenableWorkerBuilder<FxSuggestIngestionWorker>(testContext).build() - - val result = worker.startWork().await() - - verify(storage).ingest(any()) - assertEquals(ListenableWorker.Result.retry(), result) - } } |