vendredi 3 juillet 2015

Spring application not working on amazon WS

I have a spring application that runs some rest services. I have implemented some integration tests to test the implemented services in a class that is annotated like this:

@RunWith(SpringJUnit4ClassRunner.class) 
@SpringApplicationConfiguration(classes = {MongoDBTestConfiguration.class, Application.class}) 
@WebAppConfiguration 
@IntegrationTest("server.port:0")

I have run those tests several times in different platform combinations (win + java 7, win + java 8, ubuntu 15 + java 8) and it runs all the tests correctly.

Now I also have a jenkins server (1.617) in an amazon instance (ubuntu 12 lts) and there the integration tests are always failing (already tested with java7 and java8). I also executed the tests in the console and still they fail. Also I tried to run the tests in another amazon instance and they keep failing.

The reason they fail is that spring isn't able to find the application context and then is not able do load the beans.

For what I have seen so far I think this would have something to do with an amazon configuration but not 100% sure. Have anyone run into a similar case before?




Aucun commentaire:

Enregistrer un commentaire