Skip to content

Commit

Permalink
Create the Zipline instance on the Zipline thread
Browse files Browse the repository at this point in the history
  • Loading branch information
squarejesse committed Sep 18, 2023
1 parent 74e869d commit faa1d66
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ class ZiplineStackSizeTest {
Thread(null, runnable, "Treehouse", 8 * 1024 * 1024)
}
private val dispatcher = executorService.asCoroutineDispatcher()
private val zipline = Zipline.create(dispatcher)
private lateinit var zipline: Zipline

@Before
fun setUp() = runBlocking(dispatcher) {
zipline = Zipline.create(dispatcher)
zipline.loadTestingJs()
}

Expand All @@ -53,7 +54,7 @@ class ZiplineStackSizeTest {
runBlocking(dispatcher) {
zipline.quickJs.evaluate("testing.app.cash.zipline.testing.prepareRecursingService()")

val recurseCount = 300
val recurseCount = 500
val service = zipline.take<EchoService>("recursingService")
val echoResponse = service.echo(EchoRequest("$recurseCount"))
assertThat(echoResponse).isEqualTo(EchoResponse("recursed $recurseCount times!"))
Expand Down

0 comments on commit faa1d66

Please sign in to comment.