Fix intermittent CI package updates and escaped test worker (#1151)

Fix escaped cloud-save test worker and CI package updates
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-19 14:52:30 -04:00
1 parent adcb04f624
commit aa6fae1924
3 files changed
+15 -7

No files matched your search

@@ -1,6 +1,7 @@
package com.droiddeck.launcher.stores
import java.io.File
import java.util.concurrent.Executor
import org.junit.Assert.assertArrayEquals
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
@@ -11,7 +12,7 @@ import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [33])
@Config(sdk = [33], application = android.app.Application::class)
class CloudSavesTest {
private val app get() = RuntimeEnvironment.getApplication()
@@ -83,9 +84,11 @@ class CloudSavesTest {
}
@Test fun aFirstLaunchWithoutAPrefixIsDeferredNotBlocked() {
val deferred = ArrayList<Runnable>()
val folder = File(StoreInstallRoot.storeDir(StoreInstallRoot.internalRoot(app), Store.GOG), "ELDERBORN").apply { mkdirs() }
File(folder, "ELDERBORN.exe").writeText("MZ")
StoreGameSidecar(Store.GOG, "1207664643", "ELDERBORN", "ELDERBORN.exe").write(folder)
assertEquals("deferred", CloudSaves.downloadOrDefer(app, Store.GOG, "1207664643").result)
assertEquals("deferred", CloudSaves.downloadOrDefer(app, Store.GOG, "1207664643", Executor { deferred += it }).result)
assertEquals(1, deferred.size)
}
}