question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run in multiple devices

See original GitHub issue

Hello. I’m new to Marathon and I’m having some difficulty executing the tests in parallel on different devices. I’m trying to execute the tests using an emulator and a real device, but only the emulator executes the tests. I’m using the following configuration:

name: “HelloWorld” outputDir: “build/reports/marathon” vendorConfiguration: type: “Android” applicationApk: “app/build/outputs/apk/debug/app-debug.apk” testApplicationApk: “app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk”

The tests execute fine on the emulator. However, on the real device, I’m getting the following error:

> D 15:44:34.926 [main @coroutine#40] <QueueActor[DevicePoolId(name=omni)]> handle test results 127.0.0.1:5037:emulator-5554
D 15:44:34.926 [main @coroutine#40] <QueueActor[DevicePoolId(name=omni)]> request next batch for device 127.0.0.1:5037:emulator-5554
E 15:44:34.936 [main @coroutine#68] <D.0.0.1:5037:0051948259]> Error Job was cancelled
kotlinx.coroutines.JobCancellationException: Job was cancelled
	at kotlinx.coroutines.JobSupport.cancel(JobSupport.kt:1578)
	at kotlinx.coroutines.Job$DefaultImpls.cancel$default(Job.kt:189)
	at com.malinskiy.marathon.execution.DevicePoolActor.terminate(DevicePoolActor.kt:132)
	at com.malinskiy.marathon.execution.DevicePoolActor.onQueueTerminated(DevicePoolActor.kt:88)
	at com.malinskiy.marathon.execution.DevicePoolActor.receive(DevicePoolActor.kt:51)
	at com.malinskiy.marathon.execution.DevicePoolActor.receive(DevicePoolActor.kt:26)
	at com.malinskiy.marathon.actor.Actor$delegate$1.invokeSuspend(Actor.kt:31)
	(Coroutine boundary)
	at com.malinskiy.marathon.execution.device.DeviceActor$initialize$2$1.invokeSuspend(DeviceActor.kt:165)
	at com.malinskiy.marathon.execution.RetryKt.withRetry(Retry.kt:11)
	at com.malinskiy.marathon.execution.device.DeviceActor$initialize$2.invokeSuspend(DeviceActor.kt:162)
Caused by: kotlinx.coroutines.JobCancellationException: Job was cancelled
	at kotlinx.coroutines.JobSupport.cancel(JobSupport.kt:1578)
	at kotlinx.coroutines.Job$DefaultImpls.cancel$default(Job.kt:189)
	at com.malinskiy.marathon.execution.DevicePoolActor.terminate(DevicePoolActor.kt:132)
	at com.malinskiy.marathon.execution.DevicePoolActor.onQueueTerminated(DevicePoolActor.kt:88)
	at com.malinskiy.marathon.execution.DevicePoolActor.receive(DevicePoolActor.kt:51)
	at com.malinskiy.marathon.execution.DevicePoolActor.receive(DevicePoolActor.kt:26)
	at com.malinskiy.marathon.actor.Actor$delegate$1.invokeSuspend(Actor.kt:31)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:279)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at com.malinskiy.marathon.Marathon.run(Marathon.kt:52)
	at com.malinskiy.marathon.cli.ApplicationViewKt$main$1.invoke(ApplicationView.kt:62)
	at com.malinskiy.marathon.cli.ApplicationViewKt$main$1.invoke(ApplicationView.kt:29)
	at com.xenomachina.argparser.SystemExitExceptionKt.mainBody(SystemExitException.kt:74)
	at com.xenomachina.argparser.SystemExitExceptionKt.mainBody$default(SystemExitException.kt:72)
	at com.malinskiy.marathon.cli.ApplicationViewKt.main(ApplicationView.kt:27)
D 15:44:34.937 [main @coroutine#68] <D.0.0.1:5037:0051948259]> terminate 127.0.0.1:5037:0051948259

Looking at the report, I get the following info: https://drive.google.com/file/d/1dFOtbFSlvjBnQez6_L647BpQeqp8hWRn/view?usp=sharing

Am I missing something? I’m currently using Marathon version 0.7.3.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Malinskiycommented, Aug 9, 2022

No worries at all. Yeah, you can achieve this behavior by using one of the https://marathonlabs.github.io/marathon/doc/configuration.html#pooling-strategy Each pool executes all of the tests independently.

0reactions
tagantroycommented, Aug 22, 2022

Looks like this problem was solved

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple devices fail to appear in My Computer
I am running Windows 7 64 bit on an Asus laptop. This has always been a Win7 computer. This problem only started to...
Read more >
"Multiple Devices Can't Access This App At The Sam... - 892190
In-house Quest 2 headsets started getting this error ("Multiple Devices Can't Access This App at the Same Time") as soon as they -...
Read more >
How to use ADB Shell when Multiple Devices are connected ...
-e - Direct an adb command to the only running emulator. Returns an error when more than one emulator is running. Share.
Read more >
react-native run-android does not run on multiple devices #5901
It fails with error: more than one device and emulator . Expected outcome. I would like to be able to run a command...
Read more >
Not able to run test in multiple devices by keeping ...
I automated selenium grid for appium expecting to run multiple test in parallel. Once i was done with the code i started testing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found