Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Usage of SpoonRunTask fails with ShellCommandUnresponsiveException #103

Open
rzetzsche opened this issue Apr 5, 2016 · 4 comments
Open
Labels

Comments

@rzetzsche
Copy link

I tried the usage of SpoonRunTask in my own task to generate screenshots and upload these to my webserver. But on execution i get an ShellCommandUnresponsiveException which i don't get when i execute the normal "gradlew spoon" command.

Additional to the issue, why is the testSize with SpoonRunTask not optional?

EDIT:
Ok same adbTimeout value of 3000 causes different behaviours. "gradlew spoon" executes without error, executing my own task causes "ShellCommandUnresponsiveException". If I increase the time in my own task it executes without issues too. Maybe they use different time units?

@roman-mazur
Copy link
Contributor

Timeout behaviour depends on what version of spoon runner you are using. The one that is probably in current plugin dependencies sets timeout to 0 if we do not specify any value explicitly. But if you replace it with a newer one, it should use a reasonable default value instead.
square/spoon#314 (comment)

As for testSize, it was design to accept explicit "all" value when we need all tests to be run.

@rzetzsche
Copy link
Author

It could be that the default value differs. Nevertheless when i use SpoonRunnerTask or the normal plugin with spoon block than the adbTimeout value shows different behaviour.

spoon {
debug = true // for debug output
adbTimeout = 3000
}

This configuration and the gradle spoon command shows no ShellCommandUnresponsiveException.

task takeScreenshots(type: SpoonRunTask, dependsOn: ['assembleDebug', 'assembleAndroidTest']) {
...
debug = true
adbTimeout = 3000
}

This configuration and the gradle takeScreenshots command shows ShellCommandUnresponsiveException.

I think that shouldn't be a problem of the used spoon runner because both using the integrated spoon runner of the plugin, aren't they?

EDIT: Points out that the spoon configuration takes seconds, the SpoonRunnerTask takes milliseconds.

@roman-mazur
Copy link
Contributor

Task uses ms:
https://github.com/stanfy/spoon-gradle-plugin/blob/v1.0.4/src/main/groovy/com/stanfy/spoon/gradle/SpoonRunTask.groovy#L46-L47

Plugin extension uses seconds:
https://github.com/stanfy/spoon-gradle-plugin/blob/v1.0.4/src/main/groovy/com/stanfy/spoon/gradle/SpoonExtension.groovy#L35-L37

On Wed, 6 Apr 2016 at 12:36 rzetzsche [email protected] wrote:

It could be that the default value differs. Nevertheless when i use
SpoonRunnerTask or the normal plugin with spoon block than the adbTimeout
value shows different behaviour.

spoon {
debug = true // for debug output
adbTimeout = 3000
}

This configuration and the gradle spoon command shows no
ShellCommandUnresponsiveException.

task takeScreenshots(type: SpoonRunTask, dependsOn: ['assembleDebug',
'assembleAndroidTest']) {
...
debug = true
adbTimeout = 3000
}

This configuration and the gradle takeScreenshots command shows
ShellCommandUnresponsiveException.

I think that shouldn't be a problem of the used spoon runner because both
using the integrated spoon runner of the plugin, aren't they?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#103 (comment)

@rzetzsche
Copy link
Author

Thx, discover that seconds before your post. Maybe both should take the same time unit?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants