New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failure on fresh clone: RequestDispatcherSpec.shouldSend404IfTemplateIsMissing #343
Comments
$java -version |
@evanleonard I cannot reproduce, please see attached file java -version $lsb_release -a What OS are you using? |
MacOS Sierra 10.12.4 |
When I do "mvn -Dmaven.surefire.debug test" and remote-debug via intelliJ I can see that the value of "Map message = (Map) log.get("message");" is a String: "rendering template: '/hello/no-view' with layout: '/layouts/default_layout" So the cast fails. |
It looks like there is an extra entry in the "lines" variable. in the failure case I see 4 entries, and in the success case I only see 3. Here's the full value of "lines" in the fail case: {"level":"INFO","timestamp":"Wed Apr 19 14:22:50 PDT 2017","thread":"main","logger":"org.javalite.activeweb.RequestDispatcher","message":{"info":"executing controller","controller":"app.controllers.HelloController","action":"no-view","method":"GET"}} {"level":"INFO","timestamp":"Wed Apr 19 14:26:06 PDT 2017","thread":"main","logger":"org.javalite.activeweb.freemarker.FreeMarkerTemplateManager","message":"rendering template: '/hello/no-view' with layout: '/layouts/default_layout"} {"level":"INFO","timestamp":"Wed Apr 19 14:26:24 PDT 2017","thread":"main","logger":"org.javalite.activeweb.RequestDispatcher","message":{"controller":"app.controllers.HelloController","action":"no-view","duration_millis":253203,"method":"GET","url":"http://localhost","error":"Failed to find template: 'src/test/views/hello/no-view.ftl', with layout: 'src/test/views/layouts/default_layout'","status":404}} {"level":"INFO","timestamp":"Wed Apr 19 14:27:03 PDT 2017","thread":"main","logger":"org.javalite.activeweb.freemarker.FreeMarkerTemplateManager","message":"rendering template: '/system/404' with layout: '/layouts/default_layout"} |
@evanleonard I got the same problem on Windows, while Linux build is passing. I will have to look later, if you have any ideas shoot! Otherwise it will be taken care of on the weekend. |
@evanleonard see if this works for you |
@evanleonard did you test? |
$git clone https://github.com/javalite/activeweb.git
$cd activeweb
$mvn test
...
Tests run: 30, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.435 sec <<< FAILURE! - in org.javalite.activeweb.RequestDispatcherSpec
shouldSend404IfTemplateIsMissing(org.javalite.activeweb.RequestDispatcherSpec) Time elapsed: 0.019 sec <<< ERROR!
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
at org.javalite.activeweb.RequestDispatcherSpec.shouldSend404IfTemplateIsMissing(RequestDispatcherSpec.java:245)
The text was updated successfully, but these errors were encountered: