Surefire - Maven error - maven

Hi guys when i run Maven Install i got that erros on Surefire-Reports.
I'm whatched this video on youtube: JBoss Fuse Getting Started Home Loan Demo Part 1
Author: Christina Lin
I dont know u solve this errors :s
In surefire-reports folder i have that files:
File1:
http://pastebin.com/5zxjwFBK
File2:
http://pastebin.com/NN6tEN16
Can someone help me solving this?

Check your test com.tutorial.homeloan.RouteTest It looks like there is a mock setup that is never called but expected to be called. Update the mock to be more lenient, so that it is not expected to be called (if that leaves the test still valid). This is done in different ways depending on the mocking framework being used.

Related

Spring Boot Test - Reduce Console Output

We are acutally using Spring Boot 1.5.8 and as I can see, we haven't specified a specific logging framework. I'm responsible for JUnit tests as junior developer. We have about 17'000 Unit tests. When I run a lot of tests, IntelliJ can't or has performance issues with handling the console output. And I gave IntelliJ a lot of power ...
Now I adjusted the Log.LEVEL in application.yml to WARN, which works fine. But then I tried to get rid of the HTTP response & request output in the console. But even when I turn off the logging with
logging:
level:
root: WARN
in application.yml it still shows HTTP requests & responses like this:
this is filling up the console depending on the request with hundreds or thousand lines of in some cases unnecessary code!
I'm looking for an option to turn this off ... please help me. I was searching for a while, but couldn't find a answer. Probably I'm on a completely wrong road with looking after Spring Boot Logging. Thank you =)
Edit:
As an other example:
I get an error an the following console output. I just need the first lines of the start and the red (+ some additional) lines. As you can see on the scrollbar, this is just a small piece of the complete output! Acutally 7033 lines (!) are filled with HTTP request & responses like the one in the first picture.
Eek! You used:
logging:
level:
root: WARN
which is yaml format! (it would work just fine if you renamed your file application.yml)
I believe you need to express it like this:
logging.level.root=WARN
which is the correct way to express it in an application.properties file.
By chance I found the solution. I had to set print = MockMvcPrint.NONE in the #AutoConfigureMockMvc annotation. It seems like this collected the HTTP request & respones for each failed test and print everything whenever a test fails! This led to an tremendous output after some failures!

I get the same error on terminal for different file

I am running a feature file on Cucumber and every-time I get the same error message. No matter what feature file tags I run.
Missing Examples section for Scenario Outline at
features/support/internetonly.feature:10
(Cucumber::Core::Gherkin::ParseError)
Please help.
Thanks.
Error message speaks for itself: you have scenario outline without examples table. Either include examples table, either replace Scenario Outline: with just Scenario:.

Twitter handler (sensu and ruby) troubleshooting

I'm trying to get Sensu twitter-handler working on my environment. The issue is that I'm not getting any errors on screen or logs when I cat a .json event into the twitter-handler and, the tweets are not being shown on the linked account.
Here're are my config files:
https://gist.github.com/Mariano-gon/8648427
https://gist.github.com/Mariano-gon/8648455
https://gist.github.com/Mariano-gon/8648489
This is the output I get:
https://gist.github.com/Mariano-gon/8648480
One important note is that in sensu-api.log the request are being recieved:
https://gist.github.com/Mariano-gon/8673758
So, my question is: is there a way to troubleshoot this issue? Any way to debug the handler.rb?
Thanks!
Finally got it working! Thing was the new 'twitter' gem (in my case v5.6) won't work with the code as it was written. I needed to follow this great answer and this thread too. Was just a matter of sintaxis (as usual).
Thanks!

GCM: java.lang.NoClassDefFoundError: com/google/android/gcm/server/Sender

I have been trying to get Google Cloud Messaging to work in eclipse. I was able to compile the example given on their demo webpage and run that without any errors; however, when I try to create my own example using jersey I get the run time error "java.lang.NoClassDefFoundError: com/google/android/gcm/server/Sender" when the following code tries to create a sender.
#POST
#Path("/send")
public Response sendMessage() throws IOException
{
Sender sender = new Sender("api_key");
Message message = new Message.Builder().build();
sender.send(message, DataStore.getDevices(), 5);
return Response.status(200).entity("Success").build();
}
Note: I have replaced my real api key with api_key. I know it works because I was able to get the demo working by running the ant commands explained in the tutorial. Also just to be specific in case of ambiguity, the error I am getting is server side, and has nothing to do with the android device.
Things I have already tried:
I have included the gcm-server.jar in my WEB-INF/lib folder and under project properties I have included it in the build path.
I have also tried, as mentioned on other sites, to include json_simple-1.1.jar the same way I included gcm-server.jar. I don't see how this would effect this error but I saw this listed as an answer in a few different places.
(Solution) Deleted the tomcat server and created a new one. I probably could have just cleaned the project instead and had the same results.
Demo tutorial link: http://developer.android.com/guide/google/gcm/demo.html.
I just found a solution to my problem. In frustration I deleted the old Tomcat server from eclipse and created a new one. When I ran the project again there weren't any problems at all. When I first set up the project I had included the jar files in WEB-INF/lib and later, after reading a lot of posts on the internet, added gcm-server.jar to the build path. It appears that this action would have fixed it but for some reason unknown to me there were some left over files on the server from before the change. I should have tried cleaning my project but I didn't even think about that being the issue. Anyway, I hope that this helps someone because I've sort of condensed all of the information I could find on the internet into this post, as well as included my own dilemma and solution to it.

Spring security login error

I just implemented a simple login functionality using spring it how ever worked with the eclipse in built browser but gives the following error in chrome and firefox.
HTTP Status 404 - /SpringLogin/welcome.jsp;jsessionid=8332D4F3D4709DCA37C87F30F1EA03D5
The requested resource (/SpringLogin/welcome.jsp;jsessionid=BEE789093FF79CB6B67F8DA368E8B3E4) is not available.
can you please tell me why it is happening?
PS: I have two projects SpringLogin and both of them had same project names and both had similar packages. Then neither of the projects worked properly and gave the above error. How ever after I created another project with a different name and using different package names, it worked like magic. I am guessing here that it may have been the problem. But what is the logical answer that'll explain what happened there?
you don't have being calling the correct URL
it seems that the context /SpringLogin/ does not exists anymore.
Try /welcome.jsp or if you changed the name of application - try /newappname/welcome.jsp

Resources