gradle test task

This commit is contained in:
danijoo
2015-11-07 13:11:32 +01:00
parent e3381ac878
commit aa923627f3
3 changed files with 20 additions and 2 deletions

View File

@@ -15,7 +15,6 @@ public class JokeLoaderTaskTest extends AndroidTestCase {
task.execute(); task.execute();
talker.doWait(); talker.doWait();
MyBus.getInstance().unregister(this); MyBus.getInstance().unregister(this);
} }
public void onEvent(Joke joke) { public void onEvent(Joke joke) {

View File

@@ -17,3 +17,22 @@ allprojects {
jcenter() jcenter()
} }
} }
task testAll {
evaluationDependsOn ":jokesbackend"
project(":jokesbackend"){
appengine{
daemon true
}
}
tasks.getByPath(':app:connectedAndroidTest').mustRunAfter ':jokesbackend:appengineRun'
// tasks.getByPath('jokesbackend:appengineStop').mustRunAfter ':app:connectedAndroidTest'
dependsOn ':jokesbackend:appengineRun'
dependsOn ':app:connectedAndroidTest'
finalizedBy ':jokesbackend:appengineStop'
}

View File

@@ -32,7 +32,7 @@ public class MyEndpoint {
* A simple endpoint method that takes a name and says Hi back * A simple endpoint method that takes a name and says Hi back
*/ */
@ApiMethod(name = "tellJoke") @ApiMethod(name = "tellJoke")
public Joke tellJoke () { public Joke tellJoke () throws InterruptedException {
return new Joke(jp.getRandomJoke()); return new Joke(jp.getRandomJoke());
} }