ContainerSolutions / mesos-starter

https://container-solutions.com/mesos-starter/
45 stars 10 forks source link

Only run unit tests when performing a build/package #21

Closed philwinder closed 8 years ago

philwinder commented 8 years ago

At the moment when you build, it runs integration style tests that attempt to connect to a real cluster. These fail.

Default to only running unit tests. Integration tests should be a separate task.

mwl commented 8 years ago

mvn clean install doesn't run any integration tests… Yet.

By Maven nature the test goal will run unit tests and the verify will run integration test. Nothing we should change.

philwinder commented 8 years ago
$ mvn clean install    
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
13:10:54.253 [main] DEBUG o.s.t.c.j.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class org.apache.mesos.KibanaApplicationTests]
13:10:54.262 [main] DEBUG o.s.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
13:10:54.271 [main] DEBUG o.s.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduler': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected java.lang.String com.containersolutions.mesos.scheduler.UniversalScheduler.mesosMaster; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'mesos.master' in string value "${mesos.master}"
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
...  
Tests in error: 
  KibanaApplicationTests.contextLoads » IllegalState Failed to load ApplicationC...

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
mwl commented 8 years ago

That's your own application. Not mesos-starter