Skip to content

Commit 399a2a0

Browse files
authored
Merge pull request #14906 from woocommerce/fix-tests-on-trunk
Fix `trunk`: WooPosLocalCatalogSyncWorkerTest
2 parents 3532e3f + a96a2e7 commit 399a2a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WooCommerce/src/test/kotlin/com/woocommerce/android/ui/woopos/localcatalog/WooPosLocalCatalogSyncWorkerTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,9 @@ class WooPosLocalCatalogSyncWorkerTest : BaseUnitTest() {
333333
@Test
334334
fun `given sync overdue, when validateSyncStatus is called, then proceeds with sync`() = testBlocking {
335335
// GIVEN
336+
val lastSyncTimestamp = CURRENT_TIME_MILLIS - (8 * 24 * 60 * 60 * 1000L) // 8 days ago
336337
whenever(syncStatusChecker.checkSyncRequirement())
337-
.thenReturn(WooPosFullSyncRequirement.Overdue)
338+
.thenReturn(WooPosFullSyncRequirement.NonBlockingRequired(lastSyncTimestamp, isOverdue = true))
338339

339340
val worker = createWorker()
340341

0 commit comments

Comments
 (0)