From 238461d428fea901b50ef4436f258b2b4787a235 Mon Sep 17 00:00:00 2001 From: Don Turner Date: Wed, 18 Dec 2024 11:50:50 +0000 Subject: [PATCH] Add safe call to WorkInfo --- .../samples/apps/nowinandroid/sync/workers/SyncWorkerTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync/work/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/sync/workers/SyncWorkerTest.kt b/sync/work/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/sync/workers/SyncWorkerTest.kt index 9c9d13510..b0d3e724f 100644 --- a/sync/work/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/sync/workers/SyncWorkerTest.kt +++ b/sync/work/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/sync/workers/SyncWorkerTest.kt @@ -70,6 +70,6 @@ class SyncWorkerTest { testDriver.setAllConstraintsMet(request.id) val postRequirementWorkInfo = workManager.getWorkInfoById(request.id).get() - assertEquals(WorkInfo.State.RUNNING, postRequirementWorkInfo.state) + assertEquals(WorkInfo.State.RUNNING, postRequirementWorkInfo?.state) } }