[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r275954643 ## File path: examples/pom.xml ## @@ -38,13 +38,15 @@ access-timeout-meta access-timeout alternate-descriptors +applet Review comment: > main: > [jar] Building jar: /Users/cesar/git/tomee/examples/applet/target/applet/app.jar > [signjar] Signing JAR: /Users/cesar/git/tomee/examples/applet/target/applet/app.jar to /Users/cesar/git/tomee/examples/applet/target/applet/app.jar as mykey > [signjar] jarsigner error: java.lang.RuntimeException: keystore load: /Users/cesar/.keystore (No such file or directory) > [INFO] > [INFO] Reactor Summary: === You have to create the keystore first. Instructions are in README.txt This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r268409380 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: I'm not sure. I just didn't understand it at first. Speculation probably doesn't help, but I think invalid entities cause 406 errors. That is probably because of parsing the JSON, and this is just a String. I think I have fixed this particular example. Setting the pom.xml build/finalName means the version number won't be relevant in the path. That solves potential future problems too! I hope that is acceptable. If you have further comments, I would be happy to hear them. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r268409380 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: I'm not sure. I just didn't understand it at first. Speculation probably doesn't help, but I know invalid entities cause 406 errors. That is probably because of parsing the JSON, and this is just a String. I think I have fixed this particular example. Setting the pom.xml build/finalName means the version number won't be relevant in the path. That solves potential future problems too! I hope that is acceptable. If you have further comments, I would be happy to hear them. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r268404926 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: I've fixed my changes back to the original. Thanks for the encouragement. I think I was confused because it looks like it accepts invalid JSON! I may have I made a change to the original before I understood how it worked, and that only caused more problems. I didn't understand why 406 was acceptable, changed the test, and then... it was all downhill. Good intentions, bad results :\ This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r268407342 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: I've fixed my changes back to the original. Thanks for the encouragement. I think I was confused because it looks like it accepts invalid JSON! I may have I made a change to the original before I understood how it worked, and that only caused more problems. I didn't understand why 406 was acceptable, changed the test, and then... it was all downhill. Good intentions, bad results :\ This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r268404926 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: I've fixed my changes back to the original. Thanks for the encouragement. I think I was confused because it looks like it accepts invalid JSON! I may have I made a change to the original before I understood how it worked, and that only caused more problems. I didn't understand why 406 was acceptable, changed the test, and then... it was all downhill. Good intentions, bad results :\ This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r268380651 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: After further review, I now see the bval-jsr dependency in openejb-core. I think that was the cause of my confusion. It was implicitly available through openejb-core, but I didn't see it in the bval-evaluation-redeployment project. It seems there is already some code coverage in openejb-core for testing bval. I'm uncertain whether or not we need an example for further testing here, but I will do as advised. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r268379405 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: I'm sorry. I didn't realize BVal was a separate validation framework. That was a REALLY bad test before! I understand it better now. Sorry for the confusion. I will revisit this, and see what components of BVal are applicable, and test them. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r267181902 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: The service consumes application/json but had a regexp for validation. Since the param key isn't defined, the pattern causes the request to generate a 406 response. This is anticipated in the test, but there isn't any way to refine it. Form/query/path/entity validation should be a separate example in its own right. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r267182165 ## File path: examples/bval-evaluation-redeployment/runner/src/test/java/RedeploymentTest.java ## @@ -57,29 +74,27 @@ public void validateTest() throws Exception { System.out.println("==="); System.out.println("Running test on port: " + port); +final String urlPath1 = "http://localhost:"; + port + "/WebApp1" + versionNum + "/test/"; +final String urlPath2 = "http://localhost:"; + port + "/WebApp2" + versionNum + "/test/"; + deployer.deploy("webapp1"); -int result = WebClient.create("http://localhost:"; + port + "/WebApp1/test/") - .type(MediaType.APPLICATION_JSON_TYPE).post("validd").getStatus(); +int result = WebClient.create(urlPath1) + .type(MediaType.APPLICATION_JSON_TYPE).post("valid").getStatus(); + System.out.println(result); -Assert.assertEquals(406, result); +Assert.assertEquals(200, result); -//Not interested in webapp2 output -// deployer.undeploy("webapp2"); +deployer.undeploy("webapp1"); deployer.deploy("webapp2"); -result = WebClient.create("http://localhost:"; + port + "/WebApp1/test/") - .type(MediaType.APPLICATION_JSON_TYPE).post("validd").getStatus(); Review comment: All content generates a 406 not supported response when supplying valid JSON. The pattern annotation causes the format of the JSON to be rejected though. I couldn't find a way to match key/value in method args without adding particulars to the test. It didn't seem as important as verifying the proper deployment of the application, so I simplified it to focus on that. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r267181902 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: The service consumes application/json but had a regexp for validation. Since the param key isn't defined, the pattern causes the request to generate a 406 response. This is anticipated in the test, and but there isn't any way to refine it. Form/query/path/entity validation should be a separate example in its own right. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r267181475 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: The service consumes application/json but had a regexp for validation. Since the param key isn't defined, the pattern causes the request to generate a 415 unsupported media type response. This anticipated isn't the test, and there isn't any way to refine it Form/query/path/entity validation should be a separate example in its own right. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r267181475 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: The service consumes application/json but had a regexp for validation. Since the param key isn't defined, the pattern causes the request to generate a 415 unsupported media type response. This anticipated isn't the test, and there isn't any way to refine it Form/query/path/entity validation should be a separate example in its own right. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r267181475 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: The service consumes application/json but had a regexp for validation. Since the param key isn't defined, the pattern causes the request to generate a 415 unsupported media type response. This is anticipated in the test, but it isn't proper, and there isn't any way to refine the test. Form/query/path/entity validation should be a separate example in its own right. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [tomee] ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples
ShermanMarshall commented on a change in pull request #448: Tomee 2482 synchronize examples URL: https://github.com/apache/tomee/pull/448#discussion_r267181475 ## File path: examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java ## @@ -32,7 +31,7 @@ public class WebApp2Service { @POST -public Response getInfo(@Pattern(regexp = "valid") final String input) { Review comment: The service consumes application/json but had a regexp for validation. Since the param key isn't defined, the pattern causes the request to generate a 406 not acceptable response. This is anticipated in the test, but it isn't proper, and there isn't any way to refine the test. Form/query/path/entity validation should be a separate example in its own right. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services