| apply plugin: 'scala' |
| apply plugin: 'eclipse' |
| compileTestScala.options.encoding = 'UTF-8' |
| |
| repositories { |
| mavenCentral() |
| flatDir { |
| dirs 'libs' |
| } |
| mavenLocal() |
| } |
| |
| def commonConfiguration = { |
| systemProperty 'testthreads', System.getProperty('testthreads', '1') |
| systemProperty 'health_url', System.getProperty('health_url', '') |
| systemProperty 'host', System.getProperty('host', '') |
| systemProperty 'port', System.getProperty('port', '') |
| systemProperty 'trigger.suffix', System.getProperty('trigger.suffix', '') |
| systemProperty 'max.retries', System.getProperty('max.retries', '60') |
| testLogging { |
| events "passed", "skipped", "failed" |
| showStandardStreams = true |
| exceptionFormat = 'full' |
| } |
| outputs.upToDateWhen { false } // force tests to run everytime |
| } |
| |
| test { |
| configure commonConfiguration |
| exclude 'system/stress/**' |
| } |
| |
| task testWithoutCredentials(type: Test) { |
| configure commonConfiguration |
| } |
| |
| task stress(type: Test) { |
| configure commonConfiguration |
| include 'system/stress/**' |
| } |
| |
| task testHealth(type: Test) { |
| configure commonConfiguration |
| systemProperty 'test.router', 'true' |
| include 'system/health/**' |
| } |
| |
| task testNoHealth(type: Test) { |
| configure commonConfiguration |
| exclude 'system/stress/**' |
| exclude 'system/health/**' |
| exclude 'system/packages/MessagingServiceTests.class' |
| } |
| |
| task testMessageHub(type: Test) { |
| configure commonConfiguration |
| exclude 'system/stress/**' |
| exclude 'system/health/**' |
| exclude 'system/packages/MessagingServiceTests.class' |
| exclude 'system/packages/KafkaFeedTests.class' |
| exclude 'system/packages/KafkaFeedWebTests.class' |
| exclude 'system/packages/KafkaProduceTests.class' |
| } |
| |
| dependencies { |
| compile "org.scala-lang:scala-library:${gradle.scala.version}" |
| compile 'com.ibm.messagehub:messagehub.login:1.0.0' |
| compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests" |
| compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources" |
| } |
| |
| tasks.withType(ScalaCompile) { |
| scalaCompileOptions.additionalParameters = gradle.scala.compileFlags |
| } |