Only start performance tests on request
authorGeorgios Gousios <gousiosg@gmail.com>
Thu, 1 Dec 2011 11:57:19 +0000 (13:57 +0200)
committerGeorgios Gousios <gousiosg@gmail.com>
Thu, 1 Dec 2011 11:57:19 +0000 (13:57 +0200)
logic/src/test/scala/gr/grnet/aquarium/LogicTestsAssumptions.scala
logic/src/test/scala/gr/grnet/aquarium/PropertyNames.scala
logic/src/test/scala/gr/grnet/aquarium/logic/test/PerfTest.scala

index fbf82d7..f0634ca 100644 (file)
@@ -64,4 +64,5 @@ object LogicTestsAssumptions {
 
   val EnableRabbitMQTests = testPropertyTrue(PropertyNames.TestEnableRabbitMQ)
   val EnableMongoDBTests  = testPropertyTrue(PropertyNames.TestEnableMongoDB)
+  val EnablePerfTests = testPropertyTrue(PropertyNames.TestEnablePerf)
 }
\ No newline at end of file
index 5d00a46..dd488c4 100644 (file)
@@ -43,7 +43,8 @@ package gr.grnet.aquarium
 object PropertyNames {
   // Test enabling/disabling
   val TestEnableRabbitMQ = "test.enable.rabbitmq"
-  val TestEnableMongoDB = "test.enable.mongodb"
+  val TestEnableMongoDB  = "test.enable.mongodb"
+  val TestEnablePerf     = "test.enable.perf"
 
   // Test configuration files used
   val MongoDBConfFile  = "mongodb.conf.file"
index 04836a4..7841b76 100644 (file)
@@ -38,6 +38,8 @@ package gr.grnet.aquarium.logic.test
 import org.junit.Test
 import gr.grnet.aquarium.logic.accounting.dsl.{DSLTimeFrame, DSLTimeFrameRepeat, DSL, DSLUtils}
 import java.util.{Date, GregorianCalendar, Calendar}
+import org.junit.Assume._
+import gr.grnet.aquarium.LogicTestsAssumptions
 
 /**
  * Performance tests for various critical path functions.
@@ -48,6 +50,7 @@ class PerfTest extends DSLUtils with DSL {
 
   @Test
   def testAllEffectiveTimeslotPerf = {
+    assumeTrue(LogicTestsAssumptions.EnablePerfTests)
 
     val iter = 1000
     var start = System.currentTimeMillis()