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:
[email protected]
With regards,
Apache Git Services